public boolean isCompatibleWith(Configuration c) { return client.isCompatibleWith(c); } }
private static boolean isCompatible(Hive db, HiveConf c, boolean isFastCheck) { return isFastCheck ? db.metaStoreClient.isSameConfObj(c) : db.metaStoreClient.isCompatibleWith(c); }
private static boolean isCompatible(Hive db, HiveConf c, boolean isFastCheck) { if (isFastCheck) { return (db.metaStoreClient == null || db.metaStoreClient.isSameConfObj(c)) && (db.syncMetaStoreClient == null || db.syncMetaStoreClient.isSameConfObj(c)); } else { return (db.metaStoreClient == null || db.metaStoreClient.isCompatibleWith(c)) && (db.syncMetaStoreClient == null || db.syncMetaStoreClient.isCompatibleWith(c)); } }
/** * Gets hive object for the current thread. If one is not initialized then a * new one is created If the new configuration is different in metadata conf * vars then a new one is created. * * @param c * new Hive Configuration * @return Hive object for current thread * @throws HiveException * */ public static Hive get(HiveConf c) throws HiveException { Hive db = hiveDB.get(); if (db == null || (db.metaStoreClient != null && !db.metaStoreClient.isCompatibleWith(c))) { return get(c, true); } db.conf = c; return db; }