[1/5] incubator-s2graph git commit: - add README.md. - add examples on s2graph_gremlin. - add java interface for build global index. - add helper on Management. - add S2GraphFactory. - update build.sb
Repository: incubator-s2graph Updated Branches: refs/heads/master 0a41ff0d2 -> 9f0e1e6de - add README.md. - add examples on s2graph_gremlin. - add java interface for build global index. - add helper on Management. - add S2GraphFactory. - update build.sbt - add s2graph_gremlin as subproject for gremlin plugin. - upgrate sbt-assembly. Project: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/commit/ea36edae Tree: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/tree/ea36edae Diff: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/diff/ea36edae Branch: refs/heads/master Commit: ea36edaed262736a41aa73ea75ffc11980a441f5 Parents: 0a41ff0 Author: DO YUNG YOONAuthored: Tue Aug 1 18:42:41 2017 +0900 Committer: DO YUNG YOON Committed: Tue Aug 1 18:42:41 2017 +0900 -- build.sbt | 3 + loader/build.sbt| 3 - project/Common.scala| 2 +- project/assembly.sbt| 2 +- .../org/apache/s2graph/core/Management.scala| 81 ++- .../scala/org/apache/s2graph/core/S2Graph.scala | 6 +- .../apache/s2graph/core/S2GraphFactory.scala| 137 +++ .../org/apache/s2graph/core/S2Property.scala| 7 +- .../core/storage/hbase/AsynchbaseStorage.scala | 9 +- .../apache/s2graph/core/types/VertexId.scala| 2 +- .../core/tinkerpop/S2GraphProvider.scala| 64 + .../core/tinkerpop/structure/S2GraphTest.scala | 4 +- s2counter_loader/build.sbt | 4 - s2graph_gremlin/README.md | 42 ++ s2graph_gremlin/build.sbt | 82 +++ s2graph_gremlin/examples/install_plugin.sh | 28 .../examples/s2graph_getting_started.groovy | 82 +++ s2graph_gremlin/examples/s2graph_install.groovy | 21 +++ s2graph_gremlin/examples/s2graph_modern.groovy | 36 + ...inkerpop.gremlin.groovy.plugin.GremlinPlugin | 1 + .../groovy/plugin/S2GraphGremlinPlugin.scala| 59 21 files changed, 593 insertions(+), 82 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/ea36edae/build.sbt -- diff --git a/build.sbt b/build.sbt index 5c73076..b1017dd 100755 --- a/build.sbt +++ b/build.sbt @@ -61,6 +61,9 @@ lazy val s2counter_core = project.dependsOn(s2core) lazy val s2counter_loader = project.dependsOn(s2counter_core, spark) .settings(commonSettings: _*) +lazy val s2graph_gremlin = project.dependsOn(s2core) + .settings(commonSettings: _*) + lazy val root = (project in file(".")) .aggregate(s2core, s2rest_play) .dependsOn(s2rest_play, s2rest_netty, loader, s2counter_loader) // this enables packaging on the root project http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/ea36edae/loader/build.sbt -- diff --git a/loader/build.sbt b/loader/build.sbt index 73144bb..ac7d948 100644 --- a/loader/build.sbt +++ b/loader/build.sbt @@ -17,7 +17,6 @@ * under the License. */ -import sbtassembly.Plugin.AssemblyKeys._ import Common._ name := "s2loader" @@ -42,8 +41,6 @@ libraryDependencies ++= Seq( crossScalaVersions := Seq("2.10.6") -assemblySettings - mergeStrategy in assembly := { case PathList("META-INF", ps @ _*) => MergeStrategy.discard case _ => MergeStrategy.first http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/ea36edae/project/Common.scala -- diff --git a/project/Common.scala b/project/Common.scala index c714aab..b965aed 100644 --- a/project/Common.scala +++ b/project/Common.scala @@ -26,7 +26,7 @@ object Common { val hbaseVersion = "1.2.2" val hadoopVersion = "2.7.3" - val tinkerpopVersion = "3.2.4" + val tinkerpopVersion = "3.2.5" /** use Log4j 1.2.17 as the SLF4j backend in runtime, with bridging libraries to forward JCL and JUL logs to SLF4j */ val loggingRuntime = Seq( http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/ea36edae/project/assembly.sbt -- diff --git a/project/assembly.sbt b/project/assembly.sbt index 558b67e..d678255 100644 --- a/project/assembly.sbt +++ b/project/assembly.sbt @@ -17,4 +17,4 @@ * under the License. */ -addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.11.2") +addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "0.14.5") http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/ea36edae/s2core/src/main/scala/org/apache/s2graph/core/Management.scala
[3/5] incubator-s2graph git commit: remove unnecessary test for global index on S2GraphTest.
remove unnecessary test for global index on S2GraphTest. Project: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/commit/b66b96a7 Tree: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/tree/b66b96a7 Diff: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/diff/b66b96a7 Branch: refs/heads/master Commit: b66b96a7528a2c189d072e1eacfbb683c6365f5d Parents: 030cd2d Author: DO YUNG YOONAuthored: Thu Aug 3 07:06:03 2017 +0900 Committer: DO YUNG YOON Committed: Thu Aug 3 07:06:03 2017 +0900 -- .../apache/s2graph/core/tinkerpop/structure/S2GraphTest.scala| 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/b66b96a7/s2core/src/test/scala/org/apache/s2graph/core/tinkerpop/structure/S2GraphTest.scala -- diff --git a/s2core/src/test/scala/org/apache/s2graph/core/tinkerpop/structure/S2GraphTest.scala b/s2core/src/test/scala/org/apache/s2graph/core/tinkerpop/structure/S2GraphTest.scala index 9b6b60f..eb59632 100644 --- a/s2core/src/test/scala/org/apache/s2graph/core/tinkerpop/structure/S2GraphTest.scala +++ b/s2core/src/test/scala/org/apache/s2graph/core/tinkerpop/structure/S2GraphTest.scala @@ -41,7 +41,7 @@ class S2GraphTest extends FunSuite with Matchers with TestCommonWithModels { initTests() val g = new S2Graph(config) - lazy val gIndex = management.buildGlobalIndex(GlobalIndex.EdgeType, "S2GraphTest2", Seq("weight")) +// lazy val gIndex = management.buildGlobalIndex(GlobalIndex.EdgeType, "S2GraphTest2", Seq("weight")) def printEdges(edges: Seq[Edge]): Unit = { edges.foreach { edge => logger.debug(s"[FetchedEdge]: $edge") @@ -417,7 +417,7 @@ class S2GraphTest extends FunSuite with Matchers with TestCommonWithModels { } // } test("Modern") { -gIndex +//gIndex val mnt = graph.management
[2/5] incubator-s2graph git commit: fix compile error.
fix compile 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/030cd2d5 Tree: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/tree/030cd2d5 Diff: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/diff/030cd2d5 Branch: refs/heads/master Commit: 030cd2d52e7efc338336ce9c9d1fd6ce02d24203 Parents: ea36eda Author: DO YUNG YOONAuthored: Tue Aug 1 19:22:05 2017 +0900 Committer: DO YUNG YOON Committed: Tue Aug 1 19:32:32 2017 +0900 -- .../s2graph/core/rest/RequestParser.scala | 4 ++-- .../core/Integrate/IntegrateCommon.scala| 3 +-- .../apache/s2graph/core/ManagementTest.scala| 24 ++-- .../rest/play/controllers/AdminController.scala | 3 +-- 4 files changed, 16 insertions(+), 18 deletions(-) -- http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/030cd2d5/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 62d1e40..a2f5c47 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 @@ -629,7 +629,7 @@ class RequestParser(graph: S2Graph) { pk ++ both ++ in ++ out } - def toLabelElements(jsValue: JsValue) = Try { + def toLabelElements(jsValue: JsValue): Try[Label] = { val labelName = parse[String](jsValue, "label") val srcServiceName = parse[String](jsValue, "srcServiceName") val tgtServiceName = parse[String](jsValue, "tgtServiceName") @@ -653,7 +653,7 @@ class RequestParser(graph: S2Graph) { val compressionAlgorithm = (jsValue \ "compressionAlgorithm").asOpt[String].getOrElse(DefaultCompressionAlgorithm) val options = (jsValue \ "options").asOpt[JsValue].map(_.toString()) -(labelName, srcServiceName, srcColumnName, srcColumnType, +graph.management.createLabel(labelName, srcServiceName, srcColumnName, srcColumnType, tgtServiceName, tgtColumnName, tgtColumnType, isDirected, serviceName, indices, allProps, consistencyLevel, hTableName, hTableTTL, schemaVersion, isAsync, compressionAlgorithm, options) } http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/030cd2d5/s2core/src/test/scala/org/apache/s2graph/core/Integrate/IntegrateCommon.scala -- diff --git a/s2core/src/test/scala/org/apache/s2graph/core/Integrate/IntegrateCommon.scala b/s2core/src/test/scala/org/apache/s2graph/core/Integrate/IntegrateCommon.scala index fd496ee..c720b9f 100644 --- a/s2core/src/test/scala/org/apache/s2graph/core/Integrate/IntegrateCommon.scala +++ b/s2core/src/test/scala/org/apache/s2graph/core/Integrate/IntegrateCommon.scala @@ -83,8 +83,7 @@ trait IntegrateCommon extends FunSuite with Matchers with BeforeAndAfterAll { logger.info(s">> Create Label") logger.info(create) val tryRes = for { -labelArgs <- parser.toLabelElements(json) -label <- (management.createLabel _).tupled(labelArgs) +label <- parser.toLabelElements(json) } yield label tryRes.get http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/030cd2d5/s2core/src/test/scala/org/apache/s2graph/core/ManagementTest.scala -- diff --git a/s2core/src/test/scala/org/apache/s2graph/core/ManagementTest.scala b/s2core/src/test/scala/org/apache/s2graph/core/ManagementTest.scala index afc9aea..b2c1113 100644 --- a/s2core/src/test/scala/org/apache/s2graph/core/ManagementTest.scala +++ b/s2core/src/test/scala/org/apache/s2graph/core/ManagementTest.scala @@ -20,10 +20,8 @@ package org.apache.s2graph.core import org.apache.s2graph.core.Integrate.IntegrateCommon -import org.apache.s2graph.core.mysqls.{Model, Label, Service} - -import scala.util.{Failure, Success} -import play.api.libs.json.{JsValue, Json} +import org.apache.s2graph.core.mysqls.Label +import play.api.libs.json.Json class ManagementTest extends IntegrateCommon { @@ -52,10 +50,11 @@ class ManagementTest extends IntegrateCommon { copiedLabel.indices().sortBy(m => m.id.get).map(m => m.metaSeqs) should be(originalLabel.indices().sortBy(m => m.id.get).map(m => m.metaSeqs)) } - def checkLabelTTL(labelName:String, serviceName:String, setTTL:Option[Int], checkTTL:Option[Int]) = { + def checkLabelTTL(labelName: String, serviceName: String, setTTL: Option[Int], checkTTL: Option[Int]) = {