[minor](log) remove some e.printStackTrace() (#13870)

This commit is contained in:
Mingyu Chen
2022-11-02 08:42:10 +08:00
committed by GitHub
parent de1dc62843
commit 0eeb4d2881
5 changed files with 7 additions and 9 deletions

View File

@ -706,14 +706,14 @@ public class OlapTable extends Table {
nameToPartition.put(partition.getName(), partition);
}
// This is a private methid.
// This is a private method.
// Call public "dropPartitionAndReserveTablet" and "dropPartition"
private Partition dropPartition(long dbId, String partitionName, boolean isForceDrop, boolean reserveTablets) {
// 1. If "isForceDrop" is false, the partition will be added to the Catalog Recyle bin, and all tablets of this
// partition will not be deleted.
// 2. If "ifForceDrop" is true, the partition will be dropped the immediately, but whether to drop the tablets
// 2. If "ifForceDrop" is true, the partition will be dropped immediately, but whether to drop the tablets
// of this partition depends on "reserveTablets"
// If "reserveTablets" is true, the tablets of this partition will not to deleted.
// If "reserveTablets" is true, the tablets of this partition will not be deleted.
// Otherwise, the tablets of this partition will be deleted immediately.
Partition partition = nameToPartition.get(partitionName);
if (partition != null) {
@ -741,7 +741,7 @@ public class OlapTable extends Table {
try {
dummyKey = PartitionKey.createInfinityPartitionKey(dummyColumns, false);
} catch (AnalysisException e) {
e.printStackTrace();
LOG.warn("should not happen", e);
}
Range<PartitionKey> dummyRange = Range.open(new PartitionKey(), dummyKey);

View File

@ -439,7 +439,7 @@ public class DynamicPartitionScheduler extends MasterDaemon {
dropPartitionClauses = getDropPartitionClause(db, olapTable, partitionColumn, partitionFormat);
tableName = olapTable.getName();
} catch (DdlException e) {
e.printStackTrace();
LOG.warn("should not happen", e);
} finally {
olapTable.readUnlock();
}

View File

@ -119,7 +119,7 @@ public class GenericPool<VALUE extends org.apache.thrift.TServiceClient> {
try {
pool.invalidateObject(address, object);
} catch (Exception e) {
e.printStackTrace();
LOG.warn("failed to invalidate object. address: {}", address.toString(), e);
}
}

View File

@ -506,8 +506,7 @@ public class SmallFileMgr implements Writable {
try {
smallFiles.addFile(smallFile.name, smallFile);
} catch (DdlException e) {
// should not happen
e.printStackTrace();
LOG.warn("should not happen", e);
}
}
}

View File

@ -138,7 +138,6 @@ public class FEFunctions {
dateLiteral.setType(ScalarType.getDefaultDateType(dateLiteral.getType()));
return dateLiteral;
} catch (InvalidFormatException e) {
e.printStackTrace();
throw new AnalysisException(e.getMessage());
}
}