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

The following examples show how to use org.apache.hadoop.hive.conf.HiveConf#metaVars() . 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: AWSCatalogMetastoreClient.java    From aws-glue-data-catalog-client-for-apache-hive-metastore with Apache License 2.0 6 votes vote down vote up
@Override
public boolean isCompatibleWith(HiveConf conf) {
    if (currentMetaVars == null) {
        return false; // recreate
    }
    boolean compatible = true;
    for (ConfVars oneVar : HiveConf.metaVars) {
        // Since metaVars are all of different types, use string for comparison
        String oldVar = currentMetaVars.get(oneVar.varname);
        String newVar = conf.get(oneVar.varname, "");
        if (oldVar == null ||
              (oneVar.isCaseSensitive() ? !oldVar.equals(newVar) : !oldVar.equalsIgnoreCase(newVar))) {
            logger.info("Mestastore configuration " + oneVar.varname +
                  " changed from " + oldVar + " to " + newVar);
            compatible = false;
        }
    }
    return compatible;
}
 
Example 2
Source File: AWSCatalogMetastoreClient.java    From aws-glue-data-catalog-client-for-apache-hive-metastore with Apache License 2.0 6 votes vote down vote up
@Override
public boolean isCompatibleWith(HiveConf conf) {
  if (currentMetaVars == null) {
    return false; // recreate
  }
  boolean compatible = true;
  for (ConfVars oneVar : HiveConf.metaVars) {
    // Since metaVars are all of different types, use string for comparison
    String oldVar = currentMetaVars.get(oneVar.varname);
    String newVar = conf.get(oneVar.varname, "");
    if (oldVar == null ||
          (oneVar.isCaseSensitive() ? !oldVar.equals(newVar) : !oldVar.equalsIgnoreCase(newVar))) {
      logger.info("Mestastore configuration " + oneVar.varname +
            " changed from " + oldVar + " to " + newVar);
      compatible = false;
    }
  }
  return compatible;
}
 
Example 3
Source File: AWSCatalogMetastoreClient.java    From aws-glue-data-catalog-client-for-apache-hive-metastore with Apache License 2.0 4 votes vote down vote up
private void snapshotActiveConf() {
    currentMetaVars = new HashMap<String, String>(HiveConf.metaVars.length);
    for (ConfVars oneVar : HiveConf.metaVars) {
        currentMetaVars.put(oneVar.varname, conf.get(oneVar.varname, ""));
    }
}
 
Example 4
Source File: AWSCatalogMetastoreClient.java    From aws-glue-data-catalog-client-for-apache-hive-metastore with Apache License 2.0 4 votes vote down vote up
private void snapshotActiveConf() {
  currentMetaVars = new HashMap<String, String>(HiveConf.metaVars.length);
  for (ConfVars oneVar : HiveConf.metaVars) {
    currentMetaVars.put(oneVar.varname, conf.get(oneVar.varname, ""));
  }
}