Java Code Examples for org.apache.hadoop.hive.conf.HiveConf#setInt()

The following examples show how to use org.apache.hadoop.hive.conf.HiveConf#setInt() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: HiveConnectorClientConfig.java    From metacat with Apache License 2.0 6 votes vote down vote up
@VisibleForTesting
private HiveConf getDefaultConf(
    final ConnectorContext connectorContext
) {
    final HiveConf result = new HiveConf();
    result.setBoolean(HiveConfigConstants.USE_METASTORE_LOCAL, true);

    final int dataStoreTimeout = getDataStoreTimeout(connectorContext);
    result.setInt(HiveConfigConstants.JAVAX_JDO_DATASTORETIMEOUT, dataStoreTimeout);
    result.setInt(HiveConfigConstants.JAVAX_JDO_DATASTOREREADTIMEOUT, dataStoreTimeout);
    result.setInt(HiveConfigConstants.JAVAX_JDO_DATASTOREWRITETIMEOUT, getDataStoreWriteTimeout(connectorContext));
    result.setInt(HiveConfigConstants.HIVE_METASTORE_DS_RETRY, 0);
    result.setInt(HiveConfigConstants.HIVE_HMSHANDLER_RETRY, 0);
    result.set(
        HiveConfigConstants.JAVAX_JDO_PERSISTENCEMANAGER_FACTORY_CLASS,
        HiveConfigConstants.JAVAX_JDO_PERSISTENCEMANAGER_FACTORY
    );
    result.setBoolean(HiveConfigConstants.HIVE_STATS_AUTOGATHER, false);
    return result;
}
 
Example 2
Source File: GlueMetastoreClientDelegateTest.java    From aws-glue-data-catalog-client-for-apache-hive-metastore with Apache License 2.0 5 votes vote down vote up
@Test(expected = IllegalArgumentException.class)
public void testTooHighGluePartitionSegments() throws MetaException {
  HiveConf conf = new HiveConf(this.conf);
  conf.setInt(GlueMetastoreClientDelegate.NUM_PARTITION_SEGMENTS_CONF,
          DefaultAWSGlueMetastore.MAX_NUM_PARTITION_SEGMENTS + 1);
  GlueMetastoreClientDelegate delegate = new GlueMetastoreClientDelegate(conf, new DefaultAWSGlueMetastore(conf, glueClient), wh);
}
 
Example 3
Source File: HiveConfFactory.java    From dremio-oss with Apache License 2.0 4 votes vote down vote up
private void setConf(HiveConf hiveConf, String intProperty, int intValue) {
  hiveConf.setInt(intProperty, intValue);
}
 
Example 4
Source File: HiveConfFactory.java    From dremio-oss with Apache License 2.0 4 votes vote down vote up
private void setConf(HiveConf hiveConf, String intProperty, int intValue) {
  hiveConf.setInt(intProperty, intValue);
}