[ 
https://issues.apache.org/jira/browse/TINKERPOP-2941?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17724398#comment-17724398
 ] 

ASF GitHub Bot commented on TINKERPOP-2941:
-------------------------------------------

kenhuuu commented on code in PR #2053:
URL: https://github.com/apache/tinkerpop/pull/2053#discussion_r1199338778


##########
hadoop-gremlin/src/main/java/org/apache/tinkerpop/gremlin/hadoop/Constants.java:
##########
@@ -73,6 +73,7 @@ private Constants() {
     public static final String GREMLIN_SPARK_PERSIST_STORAGE_LEVEL = 
"gremlin.spark.persistStorageLevel";
     public static final String GREMLIN_SPARK_SKIP_PARTITIONER = 
"gremlin.spark.skipPartitioner"; // don't partition the loadedGraphRDD
     public static final String GREMLIN_SPARK_SKIP_GRAPH_CACHE = 
"gremlin.spark.skipGraphCache";  // don't cache the loadedGraphRDD (ignores 
graphStorageLevel)
+    public static final String GREMLIN_SPARK_DONT_DELETE_NONE_EMPTY_OUTPUT = 
"gremlin.spark.dontDeleteNonEmptyOutput"; // don't delete the output if it is 
not empty

Review Comment:
   Nit: I think there is a typo here. It should probably be 
GREMLIN_SPARK_DONT_DELETE_NON_EMPTY_OUTPUT





> DO NOT purge the output location if it has content in SparkGraphComputer
> ------------------------------------------------------------------------
>
>                 Key: TINKERPOP-2941
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP-2941
>             Project: TinkerPop
>          Issue Type: Improvement
>    Affects Versions: 3.6.2
>            Reporter: Redriver
>            Priority: Major
>
> The default logic for SparkGraphComputer is to purge all content if the 
> output location is specified. That is a dangerous operation especially for 
> the output location which contains contents.
> https://github.com/apache/tinkerpop/blob/master/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/process/computer/SparkGraphComputer.java#L317:L324
> The correct behavior is to stop the process if it detects the output location 
> is not empty.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to