You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@orc.apache.org by om...@apache.org on 2017/03/17 22:03:54 UTC

orc git commit: ORC-154. Add OrcFile.WriterOptions.clone().

Repository: orc
Updated Branches:
  refs/heads/master ae78af240 -> a393bca04


ORC-154. Add OrcFile.WriterOptions.clone().

Signed-off-by: Owen O'Malley <om...@apache.org>


Project: http://git-wip-us.apache.org/repos/asf/orc/repo
Commit: http://git-wip-us.apache.org/repos/asf/orc/commit/a393bca0
Tree: http://git-wip-us.apache.org/repos/asf/orc/tree/a393bca0
Diff: http://git-wip-us.apache.org/repos/asf/orc/diff/a393bca0

Branch: refs/heads/master
Commit: a393bca04f282770949d8aec41d93993c893ca2a
Parents: ae78af2
Author: Eugene Koifman <ek...@hortonworks.com>
Authored: Fri Mar 17 15:00:01 2017 -0700
Committer: Owen O'Malley <om...@apache.org>
Committed: Fri Mar 17 15:00:01 2017 -0700

----------------------------------------------------------------------
 java/core/src/java/org/apache/orc/OrcFile.java | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/orc/blob/a393bca0/java/core/src/java/org/apache/orc/OrcFile.java
----------------------------------------------------------------------
diff --git a/java/core/src/java/org/apache/orc/OrcFile.java b/java/core/src/java/org/apache/orc/OrcFile.java
index f8555ab..11281cb 100644
--- a/java/core/src/java/org/apache/orc/OrcFile.java
+++ b/java/core/src/java/org/apache/orc/OrcFile.java
@@ -290,7 +290,7 @@ public class OrcFile {
   /**
    * Options for creating ORC file writers.
    */
-  public static class WriterOptions {
+  public static class WriterOptions implements Cloneable {
     private final Configuration configuration;
     private FileSystem fileSystemValue = null;
     private TypeDescription schema = null;
@@ -352,6 +352,18 @@ public class OrcFile {
     }
 
     /**
+     * @return a SHALLOW clone
+     */
+    public WriterOptions clone() {
+      try {
+        return (WriterOptions) super.clone();
+      }
+      catch(CloneNotSupportedException ex) {
+        throw new AssertionError("Expected super.clone() to work");
+      }
+    }
+
+    /**
      * Provide the filesystem for the path, if the client has it available.
      * If it is not provided, it will be found from the path.
      */