You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tinkerpop.apache.org by sp...@apache.org on 2015/12/30 17:32:36 UTC
[1/3] incubator-tinkerpop git commit: Better error reporting around
gremlin.sh init script.
Repository: incubator-tinkerpop
Updated Branches:
refs/heads/master 9444168f9 -> 044b5ed69
Better error reporting around gremlin.sh init script.
Refactored code a bit to catch exceptions related to IO on the init script itself versus errors in line of code evaluation. Not sure how to write tests here since we call System.exit(1) on error.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/1f6cb945
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/1f6cb945
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/1f6cb945
Branch: refs/heads/master
Commit: 1f6cb945c5ed0171a502c6468a648e8063fa1bef
Parents: a705c21
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Dec 29 13:41:22 2015 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Dec 29 13:42:44 2015 -0500
----------------------------------------------------------------------
.../tinkerpop/gremlin/console/Console.groovy | 20 +++++++++++---------
1 file changed, 11 insertions(+), 9 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/1f6cb945/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
----------------------------------------------------------------------
diff --git a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
index acf613f..5479360 100644
--- a/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
+++ b/gremlin-console/src/main/groovy/org/apache/tinkerpop/gremlin/console/Console.groovy
@@ -282,19 +282,21 @@ class Console {
}
private void initializeShellWithScript(final String initScriptFile) {
- String line = ""
try {
- final BufferedReader reader = new BufferedReader(new InputStreamReader(
- new FileInputStream(initScriptFile), Charset.forName("UTF-8")))
- while ((line = reader.readLine()) != null) {
- groovy.execute(line)
+ final File file = new File(initScriptFile)
+ file.eachLine { line ->
+ try {
+ groovy.execute(line)
+ } catch (Exception ex) {
+ io.err.println("Bad line in Gremlin initialization file at [$line] - ${ex.message}")
+ System.exit(1)
+ }
}
- reader.close()
} catch (FileNotFoundException ignored) {
- io.err.println(String.format("Gremlin initialization file not found at [%s].", initScriptFile))
+ io.err.println("Gremlin initialization file not found at [$initScriptFile].")
System.exit(1)
- } catch (IOException ignored) {
- io.err.println(String.format("Bad line in Gremlin initialization file at [%s].", line))
+ } catch (Exception ex) {
+ io.err.println("Error starting Gremlin with initialization script at [$initScriptFile] - ${ex.message}")
System.exit(1)
}
}
[2/3] incubator-tinkerpop git commit: Update changelog.
Posted by sp...@apache.org.
Update changelog.
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/5463bd9c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/5463bd9c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/5463bd9c
Branch: refs/heads/master
Commit: 5463bd9cff76624067994e2469047d5ebbb305b6
Parents: 1f6cb94
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Dec 29 13:44:11 2015 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Dec 29 13:44:11 2015 -0500
----------------------------------------------------------------------
CHANGELOG.asciidoc | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/5463bd9c/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 028f20f..e131b81 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -27,6 +27,7 @@ TinkerPop 3.1.1 (NOT OFFICIALLY RELEASED YET)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* Execute the `LifeCycle.beforeEval()` in the same thread that `eval()` is executed in for `GremlinExecutor`.
+* Improved error handling of Gremlin Console initialization scripts to better separate errors in initialization script I/O versus execution of the script itself.
* Fixed a bug in `Graph.OptOut` when trying to opt-out of certain test cases with the `method` property set to "*".
* Added another `BulkLoader` implementation (`OneTimeBulkLoader`) that doesn't store temporary properties in the target graph.
* Fixed a `SparkGraphComputer` sorting bug in MapReduce that occurred when there was more than one partition.
[3/3] incubator-tinkerpop git commit: Merge remote-tracking branch
'origin/TINKERPOP-1055'
Posted by sp...@apache.org.
Merge remote-tracking branch 'origin/TINKERPOP-1055'
Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/044b5ed6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/044b5ed6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/044b5ed6
Branch: refs/heads/master
Commit: 044b5ed6913a1f28bba25e7b39d13e555b5c7fd8
Parents: 9444168 5463bd9
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Wed Dec 30 11:32:21 2015 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Wed Dec 30 11:32:21 2015 -0500
----------------------------------------------------------------------
CHANGELOG.asciidoc | 1 +
.../tinkerpop/gremlin/console/Console.groovy | 20 +++++++++++---------
2 files changed, 12 insertions(+), 9 deletions(-)
----------------------------------------------------------------------