Merge branch 'gerrit/neo'

Change-Id: I836a464e9412f4885d57891c8b85bae183908529
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/input/HDFSDataSourceFactory.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/input/HDFSDataSourceFactory.java
index 419782f..b190e33 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/input/HDFSDataSourceFactory.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/input/HDFSDataSourceFactory.java
@@ -18,6 +18,10 @@
  */
 package org.apache.asterix.external.input;
 
+import static org.apache.asterix.external.util.ExternalDataConstants.CONTAINER_NAME_FIELD_NAME;
+import static org.apache.asterix.external.util.ExternalDataConstants.FORMAT_PARQUET;
+import static org.apache.hyracks.api.util.ExceptionUtils.getMessageOrToString;
+
 import java.io.IOException;
 import java.util.Arrays;
 import java.util.Collections;
@@ -101,6 +105,7 @@
     }
 
     protected void configureHdfsConf(JobConf conf, Map<String, String> configuration) throws AlgebricksException {
+        String formatString = configuration.get(ExternalDataConstants.KEY_FORMAT);
         try {
             confFactory = new ConfFactory(conf);
             clusterLocations = getPartitionConstraint();
@@ -120,7 +125,6 @@
             inputSplitsFactory = new InputSplitsFactory(inputSplits);
             read = new boolean[readSchedule.length];
             Arrays.fill(read, false);
-            String formatString = configuration.get(ExternalDataConstants.KEY_FORMAT);
             if (formatString == null || formatString.equals(ExternalDataConstants.FORMAT_HDFS_WRITABLE)) {
                 RecordReader<?, ?> reader = conf.getInputFormat().getRecordReader(inputSplits[0], conf, Reporter.NULL);
                 this.recordClass = reader.createValue().getClass();
@@ -132,7 +136,19 @@
                 this.recordClass = char[].class;
             }
         } catch (IOException e) {
-            throw new CompilationException(ErrorCode.EXTERNAL_SOURCE_ERROR, e);
+            throw new CompilationException(ErrorCode.EXTERNAL_SOURCE_ERROR, e, getMessageOrToString(e));
+        } catch (Exception e) {
+            if (FORMAT_PARQUET.equals(formatString)) {
+                String containerName = configuration.get(CONTAINER_NAME_FIELD_NAME);
+                if (containerName != null && containerName.contains(".")) {
+                    throw new CompilationException(ErrorCode.EXTERNAL_SOURCE_ERROR, e,
+                            getMessageOrToString(e) + " Buckets with '.' in the name can cause issues.");
+                } else {
+                    throw e;
+                }
+            } else {
+                throw e;
+            }
         }
     }