tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spmalle...@apache.org
Subject [14/43] incubator-tinkerpop git commit: Changed back slashes into regular ones
Date Thu, 25 Feb 2016 14:01:02 GMT
Changed back slashes into regular ones


Project: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/commit/317d5c8a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/tree/317d5c8a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/diff/317d5c8a

Branch: refs/heads/TINKERPOP-1107
Commit: 317d5c8a2ca1677d634fc9a983eae234e6f2f323
Parents: a6cfc3b
Author: Marvin Froeder <marvin.froeder@vizexplorer.com>
Authored: Mon Feb 1 17:39:13 2016 +1300
Committer: Marvin Froeder <marvin.froeder@vizexplorer.com>
Committed: Mon Feb 22 09:30:54 2016 +1300

----------------------------------------------------------------------
 .../gremlin/spark/structure/io/SparkContextStorage.java      | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-tinkerpop/blob/317d5c8a/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/structure/io/SparkContextStorage.java
----------------------------------------------------------------------
diff --git a/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/structure/io/SparkContextStorage.java
b/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/structure/io/SparkContextStorage.java
index 76a3299..4b113a3 100644
--- a/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/structure/io/SparkContextStorage.java
+++ b/spark-gremlin/src/main/java/org/apache/tinkerpop/gremlin/spark/structure/io/SparkContextStorage.java
@@ -75,9 +75,9 @@ public final class SparkContextStorage implements Storage {
     @Override
     public List<String> ls(final String location) {
         final List<String> rdds = new ArrayList<>();
-        final String wildCardLocation = (location.endsWith("*") ? location : location + "*").replace(".",
"\\.").replace("*", ".*");
+        final String wildCardLocation = (location.endsWith("*") ? location : location + "*").replace(".",
"\\.").replace("*", ".*").replace('\\', '/');
         for (final RDD<?> rdd : Spark.getRDDs()) {
-            if (rdd.name().matches(wildCardLocation))
+            if (rdd.name().replace('\\', '/').matches(wildCardLocation))
                 rdds.add(rdd.name() + " [" + rdd.getStorageLevel().description() + "]");
         }
         return rdds;
@@ -103,9 +103,9 @@ public final class SparkContextStorage implements Storage {
     @Override
     public boolean rm(final String location) {
         final List<String> rdds = new ArrayList<>();
-        final String wildCardLocation = (location.endsWith("*") ? location : location + "*").replace(".",
"\\.").replace("*", ".*");
+        final String wildCardLocation = (location.endsWith("*") ? location : location + "*").replace(".",
"\\.").replace("*", ".*").replace('\\', '/');
         for (final RDD<?> rdd : Spark.getRDDs()) {
-            if (rdd.name().matches(wildCardLocation))
+            if (rdd.name().replace('\\', '/').matches(wildCardLocation))
                 rdds.add(rdd.name());
         }
         rdds.forEach(Spark::removeRDD);


Mime
View raw message