public Class<? extends OutputFormat> getOutputFileFormatClass() { if (outputFileFormatClass == null && tableDesc != null) { setOutputFileFormatClass(tableDesc.getOutputFileFormatClass()); } return outputFileFormatClass; }
public Class<? extends OutputFormat> getOutputFileFormatClass() { if (outputFileFormatClass == null && tableDesc != null) { setOutputFileFormatClass(tableDesc.getOutputFileFormatClass()); } return outputFileFormatClass; }
private PartitionDesc changePartitionToMetadataOnly(PartitionDesc desc, Path path) { if (desc == null) { return null; } boolean isEmpty = false; try { isEmpty = Utilities.isEmptyPath(physicalContext.getConf(), path); } catch (IOException e) { LOG.error("Cannot determine if the table is empty", e); } desc.setInputFileFormatClass( isEmpty ? ZeroRowsInputFormat.class : OneNullRowInputFormat.class); desc.setOutputFileFormatClass(HiveIgnoreKeyTextOutputFormat.class); desc.getProperties().setProperty(serdeConstants.SERIALIZATION_LIB, NullStructSerDe.class.getName()); return desc; }
private PartitionDesc changePartitionToMetadataOnly(PartitionDesc desc, Path path) { if (desc == null) return null; boolean isEmpty = false; try { isEmpty = Utilities.isEmptyPath(physicalContext.getConf(), path); } catch (IOException e) { LOG.error("Cannot determine if the table is empty", e); } desc.setInputFileFormatClass( isEmpty ? ZeroRowsInputFormat.class : OneNullRowInputFormat.class); desc.setOutputFileFormatClass(HiveIgnoreKeyTextOutputFormat.class); desc.getProperties().setProperty(serdeConstants.SERIALIZATION_LIB, NullStructSerDe.class.getName()); return desc; }
private void PartitionDescConstructorHelper(final Partition part,final TableDesc tblDesc, boolean setInputFileFormat) throws HiveException { this.tableDesc = tblDesc; setPartSpec(part.getSpec()); if (setInputFileFormat) { setInputFileFormatClass(part.getInputFormatClass()); } else { setOutputFileFormatClass(part.getInputFormatClass()); } setOutputFileFormatClass(part.getOutputFormatClass()); }
private void PartitionDescConstructorHelper(final Partition part,final TableDesc tblDesc, boolean setInputFileFormat) throws HiveException { PlanUtils.configureInputJobPropertiesForStorageHandler(tblDesc); this.tableDesc = tblDesc; setPartSpec(part.getSpec()); if (setInputFileFormat) { setInputFileFormatClass(part.getInputFormatClass()); } else { setOutputFileFormatClass(part.getInputFormatClass()); } setOutputFileFormatClass(part.getOutputFormatClass()); }
@Override public PartitionDesc read(Kryo kryo, Input input, Class<PartitionDesc> type) { PartitionDesc partitionDesc = super.read(kryo, input, type); // The set methods in PartitionDesc intern the any duplicate strings which is why we call them // during de-serialization partitionDesc.setBaseFileName(partitionDesc.getBaseFileName()); partitionDesc.setPartSpec(partitionDesc.getPartSpec()); partitionDesc.setInputFileFormatClass(partitionDesc.getInputFileFormatClass()); partitionDesc.setOutputFileFormatClass(partitionDesc.getOutputFileFormatClass()); return partitionDesc; } }
public Class<? extends OutputFormat> getOutputFileFormatClass() { if (outputFileFormatClass == null && tableDesc != null) { setOutputFileFormatClass(tableDesc.getOutputFileFormatClass()); } return outputFileFormatClass; }
public Class<? extends HiveOutputFormat> getOutputFileFormatClass() { if (outputFileFormatClass == null && tableDesc != null) { setOutputFileFormatClass(tableDesc.getOutputFileFormatClass()); } return outputFileFormatClass; }
private PartitionDesc changePartitionToMetadataOnly(PartitionDesc desc) { if (desc != null) { desc.setInputFileFormatClass(OneNullRowInputFormat.class); desc.setOutputFileFormatClass(HiveIgnoreKeyTextOutputFormat.class); desc.getProperties().setProperty(serdeConstants.SERIALIZATION_LIB, NullStructSerDe.class.getName()); } return desc; }
public PartitionDesc(final Partition part,final TableDesc tblDesc) throws HiveException { this.tableDesc = tblDesc; setProperties(part.getSchemaFromTableSchema(tblDesc.getProperties())); // each partition maintains a large properties partSpec = part.getSpec(); setOutputFileFormatClass(part.getInputFormatClass()); setOutputFileFormatClass(part.getOutputFormatClass()); }
public PartitionDesc(final Partition part) throws HiveException { this.tableDesc = Utilities.getTableDesc(part.getTable()); setProperties(part.getMetadataFromPartitionSchema()); partSpec = part.getSpec(); setInputFileFormatClass(part.getInputFormatClass()); setOutputFileFormatClass(part.getOutputFormatClass()); }