jena-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rve...@apache.org
Subject jena git commit: Clean up and comment code
Date Wed, 12 Nov 2014 16:13:16 GMT
Repository: jena
Updated Branches:
  refs/heads/hadoop-rdf 6a35e6765 -> c7f8c89aa


Clean up and comment code


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

Branch: refs/heads/hadoop-rdf
Commit: c7f8c89aa9ac0cb47ab2b83370ef0290cd640966
Parents: 6a35e67
Author: Rob Vesse <rvesse@apache.org>
Authored: Wed Nov 12 16:12:18 2014 +0000
Committer: Rob Vesse <rvesse@apache.org>
Committed: Wed Nov 12 16:12:18 2014 +0000

----------------------------------------------------------------------
 .../hadoop/rdf/io/output/AbstractNodeTupleOutputFormat.java   | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/jena/blob/c7f8c89a/jena-hadoop-rdf/hadoop-rdf-io/src/main/java/org/apache/jena/hadoop/rdf/io/output/AbstractNodeTupleOutputFormat.java
----------------------------------------------------------------------
diff --git a/jena-hadoop-rdf/hadoop-rdf-io/src/main/java/org/apache/jena/hadoop/rdf/io/output/AbstractNodeTupleOutputFormat.java
b/jena-hadoop-rdf/hadoop-rdf-io/src/main/java/org/apache/jena/hadoop/rdf/io/output/AbstractNodeTupleOutputFormat.java
index 3a5438e..c4a34f5 100644
--- a/jena-hadoop-rdf/hadoop-rdf-io/src/main/java/org/apache/jena/hadoop/rdf/io/output/AbstractNodeTupleOutputFormat.java
+++ b/jena-hadoop-rdf/hadoop-rdf-io/src/main/java/org/apache/jena/hadoop/rdf/io/output/AbstractNodeTupleOutputFormat.java
@@ -59,21 +59,24 @@ public abstract class AbstractNodeTupleOutputFormat<TKey, TValue, T
extends Abst
         Configuration config = context.getConfiguration();
         boolean isCompressed = getCompressOutput(context);
         CompressionCodec codec = null;
+        
+        // Build the output file path
         String extension = this.getFileExtension();
         if (isCompressed) {
+            // Add compression extension if applicable
             Class<? extends CompressionCodec> codecClass = getOutputCompressorClass(context,
GzipCodec.class);
             codec = (CompressionCodec) ReflectionUtils.newInstance(codecClass, config);
             extension += codec.getDefaultExtension();
         }
         Path file = getDefaultWorkFile(context, extension);
         LOG.info("Writing output to file " + file);
+        
+        // Open the file appropriately and create a record writer for it
         FileSystem fs = file.getFileSystem(config);
         if (!isCompressed) {
             FSDataOutputStream fileOut = fs.create(file, false);
             return this.getRecordWriter(new OutputStreamWriter(fileOut), config, file);
         } else {
-            // TODO Do we need to append the relevant extension to the path
-            // here?
             FSDataOutputStream fileOut = fs.create(file, false);
             return this.getRecordWriter(new OutputStreamWriter(codec.createOutputStream(fileOut)),
config, file);
         }


Mime
View raw message