FAQ
Author: brock
Date: Thu Jan 15 03:15:31 2015
New Revision: 1651943

URL: http://svn.apache.org/r1651943
Log:
HIVE-9374 - Fix TestHBaseCliDriver hbase_handler_bulk.q [Encryption Branch] (Sergio Pena via Brock)

Modified:
     hive/branches/HIVE-8065/common/src/java/org/apache/hadoop/hive/common/FileUtils.java
     hive/branches/HIVE-8065/hbase-handler/src/java/org/apache/hadoop/hive/hbase/HiveHFileOutputFormat.java

Modified: hive/branches/HIVE-8065/common/src/java/org/apache/hadoop/hive/common/FileUtils.java
URL: http://svn.apache.org/viewvc/hive/branches/HIVE-8065/common/src/java/org/apache/hadoop/hive/common/FileUtils.java?rev=1651943&r1=1651942&r2=1651943&view=diff
==============================================================================
--- hive/branches/HIVE-8065/common/src/java/org/apache/hadoop/hive/common/FileUtils.java (original)
+++ hive/branches/HIVE-8065/common/src/java/org/apache/hadoop/hive/common/FileUtils.java Thu Jan 15 03:15:31 2015
@@ -60,6 +60,12 @@ public final class FileUtils {
      }
    };

+ public static final PathFilter STAGING_DIR_PATH_FILTER = new PathFilter() {
+ public boolean accept(Path p) {
+ String name = p.getName();
+ return !name.startsWith(".");
+ }
+ };

    /**
     * Variant of Path.makeQualified that qualifies the input path against the default file system

Modified: hive/branches/HIVE-8065/hbase-handler/src/java/org/apache/hadoop/hive/hbase/HiveHFileOutputFormat.java
URL: http://svn.apache.org/viewvc/hive/branches/HIVE-8065/hbase-handler/src/java/org/apache/hadoop/hive/hbase/HiveHFileOutputFormat.java?rev=1651943&r1=1651942&r2=1651943&view=diff
==============================================================================
--- hive/branches/HIVE-8065/hbase-handler/src/java/org/apache/hadoop/hive/hbase/HiveHFileOutputFormat.java (original)
+++ hive/branches/HIVE-8065/hbase-handler/src/java/org/apache/hadoop/hive/hbase/HiveHFileOutputFormat.java Thu Jan 15 03:15:31 2015
@@ -41,6 +41,7 @@ import org.apache.hadoop.hbase.KeyValueU
  import org.apache.hadoop.hbase.io.ImmutableBytesWritable;
  import org.apache.hadoop.hbase.mapreduce.HFileOutputFormat;
  import org.apache.hadoop.hbase.util.Bytes;
+import org.apache.hadoop.hive.common.FileUtils;
  import org.apache.hadoop.hive.ql.exec.FileSinkOperator.RecordWriter;
  import org.apache.hadoop.hive.ql.io.HiveOutputFormat;
  import org.apache.hadoop.hive.shims.ShimLoader;
@@ -149,7 +150,7 @@ public class HiveHFileOutputFormat exten
            fs.mkdirs(columnFamilyPath);
            Path srcDir = outputdir;
            for (;;) {
- FileStatus [] files = fs.listStatus(srcDir);
+ FileStatus [] files = fs.listStatus(srcDir, FileUtils.STAGING_DIR_PATH_FILTER);
              if ((files == null) || (files.length == 0)) {
                throw new IOException("No family directories found in " + srcDir);
              }
@@ -161,7 +162,7 @@ public class HiveHFileOutputFormat exten
                break;
              }
            }
- for (FileStatus regionFile : fs.listStatus(srcDir)) {
+ for (FileStatus regionFile : fs.listStatus(srcDir, FileUtils.STAGING_DIR_PATH_FILTER)) {
              fs.rename(
                regionFile.getPath(),
                new Path(

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommits @
categorieshive, hadoop
postedJan 15, '15 at 3:15a
activeJan 15, '15 at 3:15a
posts1
users1
websitehive.apache.org

1 user in discussion

Brock: 1 post

People

Translate

site design / logo © 2021 Grokbase