Index: metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java =================================================================== --- metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java (revision 12204) +++ metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java (working copy) @@ -151,7 +151,7 @@ if (!ShimLoader.getHadoopShims().isSecureShimImpl() || cmd == null) { return; } - + UserGroupInformation ugi; try { ugi = ShimLoader.getHadoopShims().getUGIForConf(getConf()); @@ -161,7 +161,7 @@ InetAddress addr = TLoggingProcessor.getRemoteAddress(); final Formatter fmt = auditFormatter.get(); ((StringBuilder)fmt.out()).setLength(0); - auditLog.info(fmt.format(AUDIT_FORMAT, ugi.getUserName(), + auditLog.info(fmt.format(AUDIT_FORMAT, ugi.getUserName(), addr == null ? "unknown-ip-addr" : addr.toString(), cmd).toString()); } @@ -486,7 +486,7 @@ try { Metrics.startScope(function); } catch (IOException e) { - LOG.debug("Exception when starting metrics scope" + LOG.debug("Exception when starting metrics scope" + e.getClass().getName() + " " + e.getMessage()); MetaStoreUtils.printStackTrace(e); } @@ -1128,7 +1128,7 @@ Partition old_part = null; try { - old_part = get_partition(part.getDbName(), part + old_part = ms.getPartition(part.getDbName(), part .getTableName(), part.getValues()); } catch (NoSuchObjectException e) { // this means there is no existing partition @@ -1260,7 +1260,7 @@ ms.openTransaction(); Partition old_part = null; try { - old_part = get_partition(part.getDbName(), part + old_part = ms.getPartition(part.getDbName(), part .getTableName(), part.getValues()); } catch(NoSuchObjectException e) { // this means there is no existing partition @@ -1359,7 +1359,7 @@ try { ms.openTransaction(); - part = get_partition(db_name, tbl_name, part_vals); + part = ms.getPartition(db_name, tbl_name, part_vals); if (part == null) { throw new NoSuchObjectException("Partition doesn't exist. " @@ -2762,7 +2762,7 @@ if (partName != null) { Partition part = null; part = get_partition_by_name(dbName, tableName, partName); - List mPartitionCols + List mPartitionCols = ms.listPrincipalPartitionColumnGrants(principalName, principalType, dbName, tableName, partName, columnName); if (mPartitionCols.size() > 0) { @@ -3106,7 +3106,7 @@ TServerTransport serverTransport = tcpKeepAlive ? new TServerSocketKeepAlive(port) : new TServerSocket(port); - TProcessor processor = + TProcessor processor = new TLoggingProcessor(new ThriftHiveMetastore.Processor(handler)); TTransportFactory transFactory; if (useSasl) { @@ -3142,7 +3142,7 @@ throw x; } } - //Assists audit logger - gets the remote client's IP address. + //Assists audit logger - gets the remote client's IP address. private static class TLoggingProcessor implements TProcessor { private final static ThreadLocal remoteAddress = new ThreadLocal() { @@ -3158,7 +3158,7 @@ static InetAddress getRemoteAddress() { return remoteAddress.get(); } - public boolean process(final TProtocol inProt, final TProtocol outProt) + public boolean process(final TProtocol inProt, final TProtocol outProt) throws TException { if (TSocket.class.isAssignableFrom(inProt.getTransport().getClass())) { Socket socket = ((TSocket)inProt.getTransport()).getSocket();