You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@s2graph.apache.org by st...@apache.org on 2018/03/22 11:36:25 UTC
[1/3] incubator-s2graph git commit: fix wrong escaping of double quotation marks
Repository: incubator-s2graph
Updated Branches:
refs/heads/master 2ce86fa82 -> 0520ffc17
fix wrong escaping of double quotation marks
Project: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/commit/0abb56ad
Tree: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/tree/0abb56ad
Diff: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/diff/0abb56ad
Branch: refs/heads/master
Commit: 0abb56ad0038fdc7a23de6674f98963ffb6b0bde
Parents: 2ce86fa
Author: sandyskies <ch...@163.com>
Authored: Wed Mar 21 21:48:45 2018 +0800
Committer: sandyskies <ch...@163.com>
Committed: Wed Mar 21 21:48:45 2018 +0800
----------------------------------------------------------------------
.../main/scala/org/apache/s2graph/core/rest/RequestParser.scala | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/0abb56ad/s2core/src/main/scala/org/apache/s2graph/core/rest/RequestParser.scala
----------------------------------------------------------------------
diff --git a/s2core/src/main/scala/org/apache/s2graph/core/rest/RequestParser.scala b/s2core/src/main/scala/org/apache/s2graph/core/rest/RequestParser.scala
index 55a3638..304cb82 100644
--- a/s2core/src/main/scala/org/apache/s2graph/core/rest/RequestParser.scala
+++ b/s2core/src/main/scala/org/apache/s2graph/core/rest/RequestParser.scala
@@ -582,12 +582,12 @@ class RequestParser(graph: S2GraphLike) {
}
def toVertex(jsValue: JsValue, operation: String, serviceName: Option[String] = None, columnName: Option[String] = None): S2VertexLike = {
- val id = parse[JsValue](jsValue, "id")
+ val id = parse[String](jsValue, "id")
val ts = parseOption[Long](jsValue, "timestamp").getOrElse(System.currentTimeMillis())
val sName = if (serviceName.isEmpty) parse[String](jsValue, "serviceName") else serviceName.get
val cName = if (columnName.isEmpty) parse[String](jsValue, "columnName") else columnName.get
val props = fromJsonToProperties((jsValue \ "props").asOpt[JsObject].getOrElse(Json.obj()))
- graph.toVertex(sName, cName, id.toString, props, ts, operation)
+ graph.toVertex(sName, cName, id, props, ts, operation)
}
def toPropElements(jsObj: JsValue) = Try {
[2/3] incubator-s2graph git commit: fix json parse error
Posted by st...@apache.org.
fix json parse error
Project: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/commit/b31f3d31
Tree: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/tree/b31f3d31
Diff: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/diff/b31f3d31
Branch: refs/heads/master
Commit: b31f3d3123ba3b164e02d4eeb4f0f06adf1cf9d4
Parents: 0abb56a
Author: sandyskies <ch...@163.com>
Authored: Thu Mar 22 00:47:59 2018 +0800
Committer: sandyskies <ch...@163.com>
Committed: Thu Mar 22 00:47:59 2018 +0800
----------------------------------------------------------------------
.../scala/org/apache/s2graph/core/rest/RequestParser.scala | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/b31f3d31/s2core/src/main/scala/org/apache/s2graph/core/rest/RequestParser.scala
----------------------------------------------------------------------
diff --git a/s2core/src/main/scala/org/apache/s2graph/core/rest/RequestParser.scala b/s2core/src/main/scala/org/apache/s2graph/core/rest/RequestParser.scala
index 304cb82..2f6f67a 100644
--- a/s2core/src/main/scala/org/apache/s2graph/core/rest/RequestParser.scala
+++ b/s2core/src/main/scala/org/apache/s2graph/core/rest/RequestParser.scala
@@ -582,7 +582,13 @@ class RequestParser(graph: S2GraphLike) {
}
def toVertex(jsValue: JsValue, operation: String, serviceName: Option[String] = None, columnName: Option[String] = None): S2VertexLike = {
- val id = parse[String](jsValue, "id")
+ var id:String = ""
+ try {
+ id = parse[String](jsValue, "id")
+ } catch {
+ case e:Exception=>
+ id = parse[JsValue](jsValue, "id").toString
+ }
val ts = parseOption[Long](jsValue, "timestamp").getOrElse(System.currentTimeMillis())
val sName = if (serviceName.isEmpty) parse[String](jsValue, "serviceName") else serviceName.get
val cName = if (columnName.isEmpty) parse[String](jsValue, "columnName") else columnName.get
[3/3] incubator-s2graph git commit: [S2GRAPH-186]: fix wrong escaping
of double quotation marks
Posted by st...@apache.org.
[S2GRAPH-186]: fix wrong escaping of double quotation marks
JIRA:
[S2GRAPH-186] https://issues.apache.org/jira/browse/S2GRAPH-186
Pull Request:
Closes #140
Author
sandyskies <ch...@163.com>
Project: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/commit/0520ffc1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/tree/0520ffc1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/diff/0520ffc1
Branch: refs/heads/master
Commit: 0520ffc1786f59d0f480b2d6e6c9ec62e570e951
Parents: b31f3d3
Author: DO YUNG YOON <st...@apache.org>
Authored: Thu Mar 22 20:33:43 2018 +0900
Committer: DO YUNG YOON <st...@apache.org>
Committed: Thu Mar 22 20:33:43 2018 +0900
----------------------------------------------------------------------
CHANGES | 1 +
1 file changed, 1 insertion(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/0520ffc1/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 6a58df3..cae242a 100644
--- a/CHANGES
+++ b/CHANGES
@@ -42,6 +42,7 @@ Release Notes - S2Graph - Version 0.2.0
* [S2GRAPH-178] - Fix null pointer error on BulkLoader
* [S2GRAPH-181] - MutateVertices yield different state with different storage type
* [S2GRAPH-184] - spark driver exit abnormally in the loader of s2jobs
+ * [S2GRAPH-186] - fix wrong escaping of double quotation marks
** Improvement
* [S2GRAPH-72] - Support Apache TinkerPop and Gremlin