Skip to content
This repository has been archived by the owner on May 12, 2021. It is now read-only.

METRON-435 Create Stellar REPL #262

Closed
wants to merge 3 commits into from

Conversation

nickwallen
Copy link
Contributor

Created this for debugging some issues I was having in running Stellar functions are on a live cluster. Thought this would be generally useful on its own.

METRON-435

Create a REPL (Read Eval Print Loop) for the Stellar language that helps in debugging, troubleshooting and learning Stellar. The Stellar DSL (domain specific language) is used to act upon streaming data within Apache Storm. It is difficult to troubleshoot Stellar when it can only be executed within a Storm topology. This REPL is intended to help mitigate that problem by allowing a user to replicate data encountered in production, isolate initialization errors, or understand function resolution problems.

@cestella
Copy link
Member

did you mean to title this METRON-435?

Copy link
Member

@cestella cestella left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great! I love it! Just a couple things and I'm +1 for sure.

});

context = new Context.Builder()
.with(Context.Capabilities.GLOBAL_CONFIG, () -> global)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add the Context.Capabilities.ZOOKEEPER_CLIENT as well? Looks like we have it right there on line 81.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added zookeeper client to the Context.

*/
public class StellarShell {

private static final String WELCOME = "Stellar, Go!";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I LOL'd

@nickwallen
Copy link
Contributor Author

Oops, yes. Let me fix.

@nickwallen nickwallen changed the title METRON-421 Create Stellar REPL METRON-435 Create Stellar REPL Sep 20, 2016
@nickwallen
Copy link
Contributor Author

Also, added a doc string type functionality. I couldn't help myself.

>>> ?PROTOCOL_TO_NAME
PROTOCOL_TO_NAME
 desc: Convert the IANA protocol number to the protocol name       
 args: IANA Number                                                 
  ret: The protocol name associated with the IANA number.  

@cestella
Copy link
Member

What, no autocomplete? ;)

@cestella
Copy link
Member

+1, we can iterate from here. I think this is going to be super useful.

@nickwallen
Copy link
Contributor Author

Ha, trust me, I wanted to do it.

@cestella
Copy link
Member

cestella commented Sep 20, 2016

Bonus points if you had used https://github.com/qmx/jreadline and given us emacs and vi mode as well as a hook for autocomplete :)

EDIT: this appears to now be https://github.com/aeshell/aesh

@asfgit asfgit closed this in 4a4cb8b Sep 20, 2016
@nickwallen nickwallen deleted the METRON-435 branch November 30, 2016 19:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
2 participants