[S2GRAPH-205]: reuse S2Graph object on same executor

JIRA:
    [S2GRAPH-205] https://issues.apache.org/jira/browse/S2GRAPH-205

Pull Request:
    Closes #158

Author
    Chul Kang <[email protected]>


Project: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/commit/9dc39ee3
Tree: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/tree/9dc39ee3
Diff: http://git-wip-us.apache.org/repos/asf/incubator-s2graph/diff/9dc39ee3

Branch: refs/heads/master
Commit: 9dc39ee37ce0ef4e47445db84aa433158f5be8b0
Parents: 5c85dd4 de3f2aa
Author: DO YUNG YOON <[email protected]>
Authored: Mon Apr 23 11:33:05 2018 +0900
Committer: DO YUNG YOON <[email protected]>
Committed: Mon Apr 23 11:36:42 2018 +0900

----------------------------------------------------------------------
 CHANGES                                          |  1 +
 .../apache/s2graph/graphql/bind/AstHelper.scala  | 19 +++++++++++++++++++
 .../s2graph/graphql/types/FieldResolver.scala    | 19 +++++++++++++++++++
 .../apache/s2graph/graphql/types/package.scala   | 19 +++++++++++++++++++
 .../apache/s2graph/s2jobs/S2GraphHelper.scala    | 12 +++++++++---
 .../loader/LocalBulkLoaderTransformer.scala      |  2 +-
 .../loader/SparkBulkLoaderTransformer.scala      |  8 ++++----
 .../org/apache/s2graph/s2jobs/task/Sink.scala    | 12 ++++--------
 .../spark/sql/streaming/S2SinkContext.scala      |  2 ++
 .../sql/streaming/S2StreamQueryWriter.scala      |  5 ++---
 .../apache/s2graph/s2jobs/BaseSparkTest.scala    |  6 ++----
 .../s2graph/s2jobs/S2GraphHelperTest.scala       |  2 +-
 .../s2jobs/loader/GraphFileGeneratorTest.scala   |  2 +-
 13 files changed, 84 insertions(+), 25 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/9dc39ee3/CHANGES
----------------------------------------------------------------------
diff --cc CHANGES
index 5d8b5e9,5213087..f61461c
--- a/CHANGES
+++ b/CHANGES
@@@ -35,6 -35,6 +35,7 @@@ Release Notes - S2Graph - Version 0.2.
      * [S2GRAPH-163] - Update version.sbt after release
      * [S2GRAPH-180] - Implement missing Management API
      * [S2GRAPH-197] - Provide S2graphSink for non-streaming dataset
++    * [S2GRAPH-205] - too many initialize S2Graph when writeBatchMutate on 
S2GraphSink
  
  ** Bug
      * [S2GRAPH-159] - Wrong syntax at a bash script under Linux

http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/9dc39ee3/s2graphql/src/main/scala/org/apache/s2graph/graphql/bind/AstHelper.scala
----------------------------------------------------------------------
diff --cc 
s2graphql/src/main/scala/org/apache/s2graph/graphql/bind/AstHelper.scala
index ec1c04c,ec1c04c..fa2602f
--- a/s2graphql/src/main/scala/org/apache/s2graph/graphql/bind/AstHelper.scala
+++ b/s2graphql/src/main/scala/org/apache/s2graph/graphql/bind/AstHelper.scala
@@@ -1,3 -1,3 +1,22 @@@
++/*
++ * Licensed to the Apache Software Foundation (ASF) under one
++ * or more contributor license agreements.  See the NOTICE file
++ * distributed with this work for additional information
++ * regarding copyright ownership.  The ASF licenses this file
++ * to you under the Apache License, Version 2.0 (the
++ * "License"); you may not use this file except in compliance
++ * with the License.  You may obtain a copy of the License at
++ * 
++ *   http://www.apache.org/licenses/LICENSE-2.0
++ * 
++ * Unless required by applicable law or agreed to in writing,
++ * software distributed under the License is distributed on an
++ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
++ * KIND, either express or implied.  See the License for the
++ * specific language governing permissions and limitations
++ * under the License.
++ */
++
  package org.apache.s2graph.graphql.bind
  
  object AstHelper {

http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/9dc39ee3/s2graphql/src/main/scala/org/apache/s2graph/graphql/types/FieldResolver.scala
----------------------------------------------------------------------
diff --cc 
s2graphql/src/main/scala/org/apache/s2graph/graphql/types/FieldResolver.scala
index 4f092dd,4f092dd..afbbf0c
--- 
a/s2graphql/src/main/scala/org/apache/s2graph/graphql/types/FieldResolver.scala
+++ 
b/s2graphql/src/main/scala/org/apache/s2graph/graphql/types/FieldResolver.scala
@@@ -1,3 -1,3 +1,22 @@@
++/*
++ * Licensed to the Apache Software Foundation (ASF) under one
++ * or more contributor license agreements.  See the NOTICE file
++ * distributed with this work for additional information
++ * regarding copyright ownership.  The ASF licenses this file
++ * to you under the Apache License, Version 2.0 (the
++ * "License"); you may not use this file except in compliance
++ * with the License.  You may obtain a copy of the License at
++ * 
++ *   http://www.apache.org/licenses/LICENSE-2.0
++ * 
++ * Unless required by applicable law or agreed to in writing,
++ * software distributed under the License is distributed on an
++ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
++ * KIND, either express or implied.  See the License for the
++ * specific language governing permissions and limitations
++ * under the License.
++ */
++
  package org.apache.s2graph.graphql.types
  
  import org.apache.s2graph.core._

http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/9dc39ee3/s2graphql/src/main/scala/org/apache/s2graph/graphql/types/package.scala
----------------------------------------------------------------------
diff --cc 
s2graphql/src/main/scala/org/apache/s2graph/graphql/types/package.scala
index 2b648e2,2b648e2..1f43edd
--- a/s2graphql/src/main/scala/org/apache/s2graph/graphql/types/package.scala
+++ b/s2graphql/src/main/scala/org/apache/s2graph/graphql/types/package.scala
@@@ -1,3 -1,3 +1,22 @@@
++/*
++ * Licensed to the Apache Software Foundation (ASF) under one
++ * or more contributor license agreements.  See the NOTICE file
++ * distributed with this work for additional information
++ * regarding copyright ownership.  The ASF licenses this file
++ * to you under the Apache License, Version 2.0 (the
++ * "License"); you may not use this file except in compliance
++ * with the License.  You may obtain a copy of the License at
++ * 
++ *   http://www.apache.org/licenses/LICENSE-2.0
++ * 
++ * Unless required by applicable law or agreed to in writing,
++ * software distributed under the License is distributed on an
++ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
++ * KIND, either express or implied.  See the License for the
++ * specific language governing permissions and limitations
++ * under the License.
++ */
++
  package org.apache.s2graph.graphql
  
  import org.apache.s2graph.graphql.repository.GraphRepository

Reply via email to