Tabnine Logo
org.apache.gobblin.hive
Code IndexAdd Tabnine to your IDE (free)

How to use org.apache.gobblin.hive

Best Java code snippets using org.apache.gobblin.hive (Showing top 20 results out of 315)

origin: apache/incubator-gobblin

@SuppressWarnings("serial")
@Override
protected void populateTablePartitionFields(State state) {
 super.populateTablePartitionFields(state);
 this.owner = populateField(state, HiveConstants.OWNER, new TypeToken<String>() {});
 this.tableType = populateField(state, HiveConstants.TABLE_TYPE, new TypeToken<String>() {});
 this.retention = populateField(state, HiveConstants.RETENTION, new TypeToken<Long>() {});
}
origin: apache/incubator-gobblin

@SuppressWarnings("unchecked")
public T compareIsCompressed() {
 if (!this.result) {
  compare(this.existingUnit.getIsCompressed(), this.newUnit.getIsCompressed());
 }
 return (T) this;
}
origin: apache/incubator-gobblin

@SuppressWarnings("unchecked")
public T compareBucketCols() {
 if (!this.result) {
  compare(this.existingUnit.getBucketColumns(), this.newUnit.getBucketColumns());
 }
 return (T) this;
}
origin: apache/incubator-gobblin

/**
 * Compare all parameters.
 */
@SuppressWarnings("unchecked")
public T compareAll() {
 this.compareInputFormat().compareOutputFormat().compareIsCompressed().compareIsStoredAsSubDirs().compareNumBuckets()
   .compareBucketCols().compareRawLocation().compareParameters();
 return (T) this;
}
origin: apache/incubator-gobblin

@SuppressWarnings("unchecked")
public T compareParameters() {
 if (!this.result) {
  checkExistingIsSuperstate(this.existingUnit.getProps(), this.newUnit.getProps());
  checkExistingIsSuperstate(this.existingUnit.getStorageProps(), this.newUnit.getStorageProps());
  checkExistingIsSuperstate(this.existingUnit.getSerDeProps(), this.newUnit.getSerDeProps());
 }
 return (T) this;
}
origin: apache/incubator-gobblin

 @SuppressWarnings("unchecked")
 @Override
 public T compareAll() {
  super.compareAll().compareOwner().compareRetention();
  return (T) this;
 }
}
origin: apache/incubator-gobblin

protected boolean needToUpdatePartition(HivePartition existingPartition, HivePartition newPartition) {
 return getPartitionComparator(existingPartition, newPartition).compareAll().result();
}
origin: apache/incubator-gobblin

protected boolean needToUpdateTable(HiveTable existingTable, HiveTable newTable) {
 return getTableComparator(existingTable, newTable).compareAll().result();
}
origin: apache/incubator-gobblin

@SuppressWarnings("unchecked")
public T compareOwner() {
 if (!this.result) {
  compare(((HiveTable) this.existingUnit).getOwner(), ((HiveTable) this.newUnit).getOwner());
 }
 return (T) this;
}
origin: apache/incubator-gobblin

@SuppressWarnings("unchecked")
public T compareRetention() {
 if (!this.result) {
  compare(((HiveTable) this.existingUnit).getRetention(), ((HiveTable) this.newUnit).getRetention());
 }
 return (T) this;
}
origin: apache/incubator-gobblin

@SuppressWarnings("unchecked")
@Override
public T compareAll() {
 super.compareAll().compareValues();
 return (T) this;
}
origin: apache/incubator-gobblin

@SuppressWarnings("unchecked")
public T compareInputFormat() {
 if (!this.result) {
  compare(this.existingUnit.getInputFormat(), this.newUnit.getInputFormat());
 }
 return (T) this;
}
origin: apache/incubator-gobblin

@SuppressWarnings("unchecked")
public T compareNumBuckets() {
 if (!this.result) {
  compare(this.existingUnit.getNumBuckets(), this.newUnit.getNumBuckets());
 }
 return (T) this;
}
origin: apache/incubator-gobblin

@SuppressWarnings("unchecked")
public T compareOutputFormat() {
 if (!this.result) {
  compare(this.existingUnit.getOutputFormat(), this.newUnit.getOutputFormat());
 }
 return (T) this;
}
origin: apache/incubator-gobblin

@SuppressWarnings("unchecked")
public T compareIsStoredAsSubDirs() {
 if (!this.result) {
  compare(this.existingUnit.getIsStoredAsSubDirs(), this.newUnit.getIsStoredAsSubDirs());
 }
 return (T) this;
}
origin: apache/incubator-gobblin

/**
 * Add a partition to a table if not exists, or alter a partition if exists.
 *
 * @param table the {@link HiveTable} to which the partition belongs.
 * @param partition a {@link HivePartition} to which the existing partition should be updated.
 * @throws IOException
 */
public void addOrAlterPartition(HiveTable table, HivePartition partition) throws IOException {
 if (!addPartitionIfNotExists(table, partition)) {
  alterPartition(table, partition);
 }
}
origin: apache/incubator-gobblin

@Override
public boolean execute(HiveRegister register) throws IOException {
 register.dropTableIfExists(this.dbName, this.tableName);
 return true;
}
origin: apache/incubator-gobblin

@SuppressWarnings({ "serial" })
protected void populateStorageFields(State state) {
 this.location = populateField(state, HiveConstants.LOCATION, new TypeToken<String>() {});
 this.inputFormat = populateField(state, HiveConstants.INPUT_FORMAT, new TypeToken<String>() {});
 this.outputFormat = populateField(state, HiveConstants.OUTPUT_FORMAT, new TypeToken<String>() {});
 this.isCompressed = populateField(state, HiveConstants.COMPRESSED, new TypeToken<Boolean>() {});
 this.numBuckets = populateField(state, HiveConstants.NUM_BUCKETS, new TypeToken<Integer>() {});
 this.bucketColumns = populateField(state, HiveConstants.BUCKET_COLUMNS, new TypeToken<List<String>>() {});
 this.isStoredAsSubDirs = populateField(state, HiveConstants.STORED_AS_SUB_DIRS, new TypeToken<Boolean>() {});
}
origin: apache/incubator-gobblin

@Override
public boolean execute(HiveRegister register) throws IOException {
 register.dropPartitionIfExists(this.dbName, this.tableName, this.partitionKeys, this.partitionValues);
 return true;
}
origin: apache/incubator-gobblin

 @Override
 public HiveTable build() {
  return new HiveTable(this);
 }
}
org.apache.gobblin.hive

Most used classes

  • HiveMetastoreClientPool
    A pool of IMetaStoreClient for querying the Hive metastore.
  • HiveRegProps
    An extension to State for Hive registration.
  • HiveRegistrationPolicyBase
    A base implementation of HiveRegistrationPolicy. It obtains database name from property #HIVE_DATABA
  • HiveRegister
    A class for registering Hive tables and partitions.
  • HiveRegistrationPolicy
    An interface for generating a HiveSpec for a Path.
  • HiveSpec,
  • HiveMetastoreClientPool$MultiClient,
  • HiveRegisterStep,
  • HiveSerDeWrapper,
  • SimpleHiveSpec$Builder,
  • HiveConfFactory,
  • HiveMetaStoreClientFactory,
  • HiveRegistrationUnit,
  • HiveRegistrationUnitComparator,
  • HiveSerDeWrapper$BuiltInHiveSerDe,
  • HiveTable$Builder,
  • HiveTable,
  • HiveAvroSerDeManager,
  • HiveLock
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now