This is an automated email from the ASF dual-hosted git repository.
csterling pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-samoa.git
The following commit(s) were added to refs/heads/master by this push:
new 4b29b1d Fix samoa-strom properties file path
4b29b1d is described below
commit 4b29b1dd1843ac90874af87c5252801eab0ec0f4
Author: kwangin <[email protected]>
AuthorDate: Mon Oct 9 12:35:42 2017 +0900
Fix samoa-strom properties file path
---
.../org/apache/samoa/topology/impl/StormJarSubmitter.java | 2 +-
.../java/org/apache/samoa/topology/impl/StormSamoaUtils.java | 12 +++++++-----
2 files changed, 8 insertions(+), 6 deletions(-)
diff --git
a/samoa-storm/src/main/java/org/apache/samoa/topology/impl/StormJarSubmitter.java
b/samoa-storm/src/main/java/org/apache/samoa/topology/impl/StormJarSubmitter.java
index a3de798..0503a5c 100644
---
a/samoa-storm/src/main/java/org/apache/samoa/topology/impl/StormJarSubmitter.java
+++
b/samoa-storm/src/main/java/org/apache/samoa/topology/impl/StormJarSubmitter.java
@@ -66,7 +66,7 @@ public class StormJarSubmitter {
Properties props = StormSamoaUtils.getProperties();
props.setProperty(StormJarSubmitter.UPLOADED_JAR_LOCATION_KEY,
uploadedJarLocation);
- File f = new File("src/main/resources/samoa-storm-cluster.properties");
+ File f = new File("../bin/samoa-storm.properties");
f.createNewFile();
OutputStream out = new FileOutputStream(f);
diff --git
a/samoa-storm/src/main/java/org/apache/samoa/topology/impl/StormSamoaUtils.java
b/samoa-storm/src/main/java/org/apache/samoa/topology/impl/StormSamoaUtils.java
index 7f7e578..6f7d50e 100644
---
a/samoa-storm/src/main/java/org/apache/samoa/topology/impl/StormSamoaUtils.java
+++
b/samoa-storm/src/main/java/org/apache/samoa/topology/impl/StormSamoaUtils.java
@@ -52,18 +52,20 @@ public class StormSamoaUtils {
static Properties getProperties() throws IOException {
Properties props = new Properties();
- InputStream is;
+ InputStream is = null;
- File f = new File("src/main/resources/samoa-storm-cluster.properties"); //
FIXME it does not exist anymore
- is = new FileInputStream(f);
+ File f = new File("../bin/samoa-storm.properties");
try {
+ is = new FileInputStream(f);
props.load(is);
} catch (IOException e1) {
- System.out.println("Fail to load property file");
+ System.out.println("Fail to load samoa-storm property file");
return null;
} finally {
- is.close();
+ if (is != null) {
+ is.close();
+ }
}
return props;