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/06/15 07:34:18 UTC

[2/7] incubator-s2graph git commit: support multiple partitions

support multiple partitions


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

Branch: refs/heads/master
Commit: 63727f32c35b54ec07ed1f74df9671f3e9d26ba7
Parents: f42885b
Author: Chul Kang <el...@apache.org>
Authored: Fri Jun 8 00:04:25 2018 +0900
Committer: Chul Kang <el...@apache.org>
Committed: Fri Jun 8 00:04:25 2018 +0900

----------------------------------------------------------------------
 s2jobs/src/main/scala/org/apache/s2graph/s2jobs/task/Sink.scala | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-s2graph/blob/63727f32/s2jobs/src/main/scala/org/apache/s2graph/s2jobs/task/Sink.scala
----------------------------------------------------------------------
diff --git a/s2jobs/src/main/scala/org/apache/s2graph/s2jobs/task/Sink.scala b/s2jobs/src/main/scala/org/apache/s2graph/s2jobs/task/Sink.scala
index ae88b6d..f7c72cc 100644
--- a/s2jobs/src/main/scala/org/apache/s2graph/s2jobs/task/Sink.scala
+++ b/s2jobs/src/main/scala/org/apache/s2graph/s2jobs/task/Sink.scala
@@ -93,7 +93,7 @@ abstract class Sink(queryName: String, override val conf: TaskConf) extends Task
       case _ => SaveMode.Overwrite
     }
 
-    val partitionedWriter = if (partitionsOpt.isDefined) writer.partitionBy(partitionsOpt.get) else writer
+    val partitionedWriter = if (partitionsOpt.isDefined) writer.partitionBy(partitionsOpt.get.split(","): _*) else writer
 
     writeBatchInner(partitionedWriter.format(FORMAT).mode(mode))
   }