Source:
private void validateTable() throws InvalidTable, ConnectionError { try { tableObject = new Table(getMSC().getTable(database, table)); } catch (Exception e) { LOG.warn("Unable to validate the table for connection: " + toConnectionInfoString(), e); throw new InvalidTable(database, table, e); } if (!AcidUtils.isFullAcidTable(tableObject)) { LOG.error("HiveEndPoint " + this + " must use an acid table"); throw new InvalidTable(database, table, "is not an Acid table"); } if (tableObject.getPartitionKeys() != null && !tableObject.getPartitionKeys().isEmpty()) { setPartitionedTable(true); } else { setPartitionedTable(false); } if (!isPartitionedTable() && (staticPartitionValues != null && !staticPartitionValues.isEmpty())) { String errMsg = this.toString() + " specifies partitions for un-partitioned table"; LOG.error(errMsg); throw new ConnectionError(errMsg); } if (transactionBatchSize > 1) { try (FileSystem fs = tableObject.getDataLocation().getFileSystem(conf)) { if (BlobStorageUtils.isBlobStorageFileSystem(conf, fs)) { Path path = new Path(tableObject.getDataLocation(), "tmp_stream_verify_" + UUID.randomUUID().toString()); try(FSDataOutputStream out = fs.create(path, false)){ if (!out.hasCapability(StreamCapabilities.HFLUSH)) { throw new ConnectionError( "The backing filesystem only supports transaction batch sizes of 1, but " + transactionBatchSize + " was requested."); } fs.deleteOnExit(path); } catch (IOException e){ throw new ConnectionError("Could not create path for database", e); } } } catch (IOException e) { throw new ConnectionError("Could not retrieve FileSystem of table", e); } } }

Target:
private void validateTable() throws InvalidTable, ConnectionError { try { tableObject = new Table(getMSC().getTable(database, table)); } catch (Exception e) { LOG.warn("Unable to validate the table for connection: " + toConnectionInfoString(), e); throw new InvalidTable(database, table, e); } if (!AcidUtils.isFullAcidTable(tableObject)) { LOG.error("HiveEndPoint " + this + " must use an acid table"); throw new InvalidTable(database, table, "is not an Acid table"); } if (tableObject.getPartitionKeys() != null && !tableObject.getPartitionKeys().isEmpty()) { setPartitionedTable(true); } else { setPartitionedTable(false); } if (!isPartitionedTable() && (staticPartitionValues != null && !staticPartitionValues.isEmpty())) { String errMsg = this.toString() + " specifies partitions for un-partitioned table"; LOG.error(errMsg); throw new ConnectionError(errMsg); } if (transactionBatchSize > 1) { try (FileSystem fs = tableObject.getDataLocation().getFileSystem(conf)) { if (BlobStorageUtils.isBlobStorageFileSystem(conf, fs)) { Path path = new Path("/tmp", "_tmp_stream_verify_" + UUID.randomUUID().toString()); try(FSDataOutputStream out = fs.create(path, false)){ if (!out.hasCapability(StreamCapabilities.HFLUSH)) { throw new ConnectionError( "The backing filesystem only supports transaction batch sizes of 1, but " + transactionBatchSize + " was requested."); } fs.deleteOnExit(path); } catch (IOException e){ throw new ConnectionError("Could not create path for database", e); } } } catch (IOException e) { throw new ConnectionError("Could not retrieve FileSystem of table", e); } } }