#NEWLINE# def main( ) : #NEWLINE# #INDENT# if ( len ( sys . argv ) != 2 ) : #NEWLINE# #INDENT# usage ( ) #NEWLINE# sys . exit ( ( - 1 ) ) #NEWLINE# #UNINDENT# conf = ClusterConfig ( sys . argv [ 1 ] ) . get_conf ( ) #NEWLINE# ( url , token ) = storlet_get_auth ( conf ) #NEWLINE# sys . stdout . write ( 'Enter absolute path to storlet jar file: ' ) #NEWLINE# storlet_jar = sys . stdin . readline ( ) . rstrip ( ) #NEWLINE# print ( 'Your jar file contains the following classes:' ) #NEWLINE# list_classes ( storlet_jar ) #NEWLINE# sys . stdout . write ( ( 'Please enter fully qualified storlet main class ' + '(choose from the list above): ' ) ) #NEWLINE# storlet_main_class = sys . stdin . readline ( ) . rstrip ( ) #NEWLINE# print ( 'Please enter dependency jars (leave a blank line when you are done):' ) #NEWLINE# dependency_jars = [ ] #NEWLINE# dependencies = [ ] #NEWLINE# dependency_jar = sys . stdin . readline ( ) . rstrip ( ) #NEWLINE# while dependency_jar : #NEWLINE# #INDENT# dependency_jars . append ( dependency_jar ) #NEWLINE# dependencies . append ( os . path . basename ( dependency_jar ) ) #NEWLINE# dependency_jar = sys . stdin . readline ( ) . rstrip ( ) #NEWLINE# #UNINDENT# deploy_storlet ( url , conf , storlet_jar , storlet_main_class , dependency_jars , dependencies )