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

Commit 92a1f1b

Browse files
committed
Fixed code to as per comments
1 parent 59e178b commit 92a1f1b

3 files changed

Lines changed: 4 additions & 39 deletions

File tree

python/pyapex/apexapp.py

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
from py4j.protocol import Py4JJavaError
2626
from shellconn import ShellConnector
2727

28-
2928
def createApp(name):
3029
shellConnector = ShellConnector()
3130
return ApexStreamingApp(name, shellConnector)
@@ -39,7 +38,6 @@ def getApp(name):
3938
'''
4039
This is Python Wrapper Around ApexStreamingApp
4140
If java streaming app is not found then no apis can be called on this wrapper.
42-
4341
'''
4442
class ApexStreamingApp():
4543
app_id = None
@@ -60,10 +58,9 @@ def __init__(self, name, shell_connector=None, java_app=None):
6058
self.shell_connector = shell_connector
6159
self.instance_id = uuid1().urn[9:]
6260

63-
'''
64-
This fuction will initialize input adapter to read from hdfs adapter
65-
'''
66-
61+
'''
62+
This fuction will initialize input adapter to read from hdfs adapter
63+
'''
6764
def from_directory(self, folder_path):
6865
self.java_streaming_app = self.java_streaming_app.fromFolder(folder_path)
6966
return self

python/pyapex/commands.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
import getopt
2222
import sys
2323

24-
2524
def kill_app(app_name):
2625
app = getApp(app_name)
2726
if app:

python/src/main/java/org/apache/apex/malhar/python/PyApex.java

Lines changed: 1 addition & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,6 @@ public PythonApp createApp(String name)
4444
streamApp = new PythonApp(name);
4545
}
4646
return streamApp;
47-
4847
}
4948

5049
public PythonApp getAppByName(String name)
@@ -66,47 +65,17 @@ public PythonApp getAppByName(String name)
6665
streamApp = new PythonApp(name);
6766
}
6867
return streamApp;
69-
7068
}
7169

7270
public static void main(String[] args)
7371
{
7472

75-
LOG.info("Starting PYAPEX with {}" + StringUtils.join(args,' '));
73+
LOG.info("Starting PYAPEX with {}" + StringUtils.join(args, ' '));
7674
PropertyConfigurator.configure("./log.properties");
7775
PyApex pythonEntryPoint = new PyApex();
7876
GatewayServer gatewayServer = new GatewayServer(pythonEntryPoint);
7977
gatewayServer.start();
8078
LOG.debug("Gateway Server Started");
81-
8279
}
8380

84-
85-
// Additional code to handle Arguments.
86-
// public static CommandLine parseArguments(String[] args)
87-
// {
88-
// BasicParser parser = new BasicParser();
89-
// CommandLine cmd = null;
90-
// HelpFormatter formatter = new HelpFormatter();
91-
// Options options = getOptions();
92-
// try {
93-
// cmd = parser.parse(options, args);
94-
// } catch (ParseException e) {
95-
// formatter.printHelp("Apex-Java", options);
96-
// System.exit(1);
97-
// return null;
98-
// }
99-
// return cmd;
100-
//
101-
// }
102-
//
103-
// public static Options getOptions()
104-
// {
105-
// Options options = new Options();
106-
// Option input = new Option("l", "logfile", true, "Log file path");
107-
// input.setRequired(true);
108-
// options.addOption(input);
109-
// return options;
110-
// }
111-
11281
}

0 commit comments

Comments
 (0)