@Override public String toString() { return JavaUtils.lockIdToString(lockId) + " queryId=" + queryId + " " + JavaUtils.txnIdToString(txnId); } }
/** * Creates a pair. Constructor doesn't infer template args but * the method does, so the code becomes less ugly. */ public static <T1, T2> ObjectPair<T1, T2> create(T1 f, T2 s) { return new ObjectPair<T1, T2>(f, s); }
@Override public boolean equals(Object that) { if (that == null) { return false; } if (that instanceof ObjectPair) { return this.equals((ObjectPair<F, S>)that); } return false; }
public FosterStorageHandler(String ifName, String ofName, String serdeName) throws ClassNotFoundException { this((Class<? extends InputFormat>) JavaUtils.loadClass(ifName), (Class<? extends OutputFormat>) JavaUtils.loadClass(ofName), (Class<? extends AbstractSerDe>) JavaUtils.loadClass(serdeName)); }
/** * Initialize log4j. * * @return an message suitable for display to the user * @throws LogInitializationException if log4j fails to initialize correctly */ public static String initHiveLog4j() throws LogInitializationException { return initHiveLog4jCommon(HiveConf.ConfVars.HIVE_LOG4J_FILE); }
public static void checkFileAccessWithImpersonation(final FileSystem fs, final FileStatus stat, final FsAction action, final String user) throws IOException, AccessControlException, InterruptedException, Exception { checkFileAccessWithImpersonation(fs, stat, action, user, null); }
public static boolean isOwnerOfFileHierarchy(FileSystem fs, FileStatus fileStatus, String userName) throws IOException, InterruptedException { return isOwnerOfFileHierarchy(fs, fileStatus, userName, true); }
public static Path[] internUriStringsInPathArray(Path[] paths) { if (paths != null) { for (Path path : paths) { internUriStringsInPath(path); } } return paths; }
@Override public String toString() { return writeToString(); }
/** * @param expr the expr to set */ public void setExpr(String expr) { this.expr = StringInternUtils.internIfNotNull(expr); }
public void setPartSpec(final LinkedHashMap<String, String> partSpec) { StringInternUtils.internValuesInMap(partSpec); this.partSpec = partSpec; }
public HiveLockObject(String[] paths, HiveLockObjectData lockData) { this.pathNames = StringInternUtils.internStringsInArray(paths); this.data = lockData; }
public HeapMemoryMonitor(double threshold) { this.threshold = threshold <= 0.0d || threshold > 1.0d ? DEFAULT_THRESHOLD : threshold; setupTenuredGenPoolThreshold(tenuredGenPool); }
/** Returns a copy of the most recent data measured by this monitor. */ public GcData getLatestGcData() { return curData.clone(); }
public HiveKVResultCache() { writeBuffer = new ObjectPair[IN_MEMORY_NUM_ROWS]; readBuffer = new ObjectPair[IN_MEMORY_NUM_ROWS]; for (int i = 0; i < IN_MEMORY_NUM_ROWS; i++) { writeBuffer[i] = new ObjectPair<HiveKey, BytesWritable>(); readBuffer[i] = new ObjectPair<HiveKey, BytesWritable>(); } }
/** * Initialize log4j for execution mode. * * @return an message suitable for display to the user * @throws LogInitializationException if log4j-exec fails to initialize correctly */ public static String initHiveExecLog4j() throws LogInitializationException { return initHiveLog4jCommon(HiveConf.ConfVars.HIVE_EXEC_LOG4J_FILE); }
public ASTNodeOrigin(String objectType, String objectName, String objectDefinition, String usageAlias, ASTNode usageNode) { this.objectType = objectType; this.objectName = objectName; this.objectDefinition = StringInternUtils.internIfNotNull(objectDefinition); this.usageAlias = usageAlias; this.usageNode = usageNode; }
public void setProperties(final Properties properties) { StringInternUtils.internValuesInMap((Map) properties); this.properties = properties; }
public HiveLockObject(String path, HiveLockObjectData lockData) { this.pathNames = new String[1]; this.pathNames[0] = StringInternUtils.internIfNotNull(path); this.data = lockData; }
public void setValue(Object value) { // Kryo setter if (value instanceof String) { value = StringInternUtils.internIfNotNull((String) value); } this.value = value; }