Skip to content

Commit 1fa9fe1

Browse files
committed
Removed EMAIL, LICENSE, SPARK_MEM and elastic references from zingg.sh
Made EMAIL optional in ClientOptions
1 parent cb39e21 commit 1fa9fe1

File tree

3 files changed

+4
-8
lines changed

3 files changed

+4
-8
lines changed

client/src/main/java/zingg/client/Client.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ else if (options.get(ClientOptions.CONF).value.endsWith("env")) {
160160
LOG.warn("Zingg processing has completed");
161161
}
162162
catch(ZinggClientException e) {
163-
if (options != null) {
163+
if (options != null && options.get(ClientOptions.EMAIL) != null) {
164164
Email.email(options.get(ClientOptions.EMAIL).value, new EmailBody("Error running Zingg job",
165165
"Zingg Error ",
166166
e.getMessage()));
@@ -186,7 +186,7 @@ else if (options.get(ClientOptions.CONF).value.endsWith("env")) {
186186
}
187187
}
188188
catch(ZinggClientException e) {
189-
if (options != null) {
189+
if (options != null && options.get(ClientOptions.EMAIL) != null) {
190190
Email.email(options.get(ClientOptions.EMAIL).value, new EmailBody("Error running Zingg job",
191191
"Zingg Error ",
192192
e.getMessage()));

client/src/main/java/zingg/client/ClientOptions.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public class ClientOptions {
4949
static { //This is the canonical list of Zingg options.
5050
optionMaster.put(CONF, new Option(CONF, true, "JSON configuration with data input output locations and field definitions", false, true));
5151
optionMaster.put(PHASE, new Option(PHASE, true, Util.join(ZinggOptions.getAllZinggOptions(), "|"), false, true, ZinggOptions.getAllZinggOptions()));
52-
optionMaster.put(LICENSE, new Option(LICENSE, true, "location of license file", false, true));
52+
optionMaster.put(LICENSE, new Option(LICENSE, true, "location of license file", false, false));
5353
optionMaster.put(JOBID, new Option(JOBID, true, "database job id for logging", false, false));
5454
optionMaster.put(EMAIL, new Option(EMAIL, true, "notification email id. Can be an alias", false, false));
5555
optionMaster.put(FORMAT, new Option(FORMAT, true, "format of the data", false, false));

scripts/zingg.sh

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
#!/bin/bash
22
#ZINGG_HOME=./assembly/target
33
ZINGG_JARS=$ZINGG_HOME/zingg-0.3.3-SNAPSHOT.jar
4-
5-
LICENSE="test"
6-
##for local
7-
export SPARK_MEM=10g
84

95
if [[ -z "${ZINGG_EXTRA_JARS}" ]]; then
106
OPTION_JARS=""
@@ -18,4 +14,4 @@ else
1814
OPTION_SPARK_CONF="${ZINGG_EXTRA_SPARK_CONF}"
1915
fi
2016

21-
$SPARK_HOME/bin/spark-submit --master $SPARK_MASTER $OPTION_JARS $OPTION_SPARK_CONF --conf spark.serializer=org.apache.spark.serializer.KryoSerializer --conf spark.es.nodes="127.0.0.1" --conf spark.es.port="9200" --conf spark.es.resource="cluster/cluster1" --conf spark.default.parallelism="8" --conf spark.executor.extraJavaOptions="-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+HeapDumpOnOutOfMemoryError -Xloggc:/tmp/memLog.txt -XX:+UseCompressedOops" --conf spark.executor.memory=10g --conf spark.debug.maxToStringFields=200 --driver-class-path $ZINGG_JARS --class zingg.client.Client $ZINGG_JARS $@ --email $EMAIL --license $LICENSE
17+
$SPARK_HOME/bin/spark-submit --master $SPARK_MASTER $OPTION_JARS $OPTION_SPARK_CONF --conf spark.serializer=org.apache.spark.serializer.KryoSerializer --conf spark.default.parallelism="8" --conf spark.executor.extraJavaOptions="-verbose:gc -XX:+PrintGCDetails -XX:+PrintGCTimeStamps -XX:+HeapDumpOnOutOfMemoryError -Xloggc:/tmp/memLog.txt -XX:+UseCompressedOops" --conf spark.executor.memory=10g --conf spark.debug.maxToStringFields=200 --driver-class-path $ZINGG_JARS --class zingg.client.Client $ZINGG_JARS $@

0 commit comments

Comments
 (0)