mirror of
https://github.com/apache/zeppelin
synced 2026-05-24 09:38:26 +00:00
set spark version to 1.6.2 and throw original exception
This commit is contained in:
parent
27d769005e
commit
55c1322356
2 changed files with 7 additions and 5 deletions
|
|
@ -34,7 +34,7 @@
|
|||
|
||||
<properties>
|
||||
<beam.hadoop.version>2.3.0</beam.hadoop.version>
|
||||
<beam.spark.version>1.6.1</beam.spark.version>
|
||||
<beam.spark.version>1.6.2</beam.spark.version>
|
||||
<beam.beam.version>0.2.0-incubating</beam.beam.version>
|
||||
</properties>
|
||||
|
||||
|
|
|
|||
|
|
@ -69,7 +69,8 @@ public class StaticRepl {
|
|||
boolean hasMain = false;
|
||||
|
||||
for (int j = 0; j < classes.get(i).getMethods().size(); j++) {
|
||||
if (classes.get(i).getMethods().get(j).getName().equals("main")) {
|
||||
if (classes.get(i).getMethods().get(j).getName().equals("main") && classes.get(i)
|
||||
.getMethods().get(j).getModifiers().toString().contains("static")) {
|
||||
mainClassName = classes.get(i).getName();
|
||||
hasMain = true;
|
||||
break;
|
||||
|
|
@ -83,8 +84,9 @@ public class StaticRepl {
|
|||
|
||||
// if there isn't Main method, will retuen error
|
||||
if (mainClassName == null) {
|
||||
logger.error("Exception for Main method", "There isn't any class containing Main method.");
|
||||
throw new Exception("There isn't any class containing Main method.");
|
||||
logger.error("Exception for Main method", "There isn't any class "
|
||||
+ "containing static main method.");
|
||||
throw new Exception("There isn't any class containing static main method.");
|
||||
}
|
||||
|
||||
// replace name of class containing Main method with generated name
|
||||
|
|
@ -152,7 +154,7 @@ public class StaticRepl {
|
|||
logger.error("Exception in Interpreter while execution", e);
|
||||
System.err.println(e);
|
||||
e.printStackTrace(newErr);
|
||||
throw new Exception(baosErr.toString());
|
||||
throw new Exception(baosErr.toString(), e);
|
||||
|
||||
} finally {
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue