[FE Code Style][sub] Adjust some check rules (#9345)
Adjust `RedundantImport`,`UnusedImports`,`EmptyStatement`,`NewlineAtEndOfFile`,`UpperEll`, `AvoidStarImport`, `MissingOverride` rules.
This commit is contained in:
@ -70,4 +70,4 @@ public class AdminCancelRebalanceDiskStmt extends DdlStmt {
|
||||
public RedirectStatus getRedirectStatus() {
|
||||
return RedirectStatus.NO_FORWARD;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -70,4 +70,4 @@ public class AdminCleanTrashStmt extends DdlStmt {
|
||||
public RedirectStatus getRedirectStatus() {
|
||||
return RedirectStatus.NO_FORWARD;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -76,4 +76,4 @@ public class AdminRebalanceDiskStmt extends DdlStmt {
|
||||
public RedirectStatus getRedirectStatus() {
|
||||
return RedirectStatus.NO_FORWARD;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -26,4 +26,4 @@ public enum AlterUserType {
|
||||
private AlterUserType(String type) {
|
||||
this.type = type;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -127,4 +127,4 @@ public class BackupStmt extends AbstractBackupStmt {
|
||||
sb.append("\n)");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -64,4 +64,4 @@ public class BinlogDesc {
|
||||
}
|
||||
dataSyncJobType = DataSyncJobType.fromString(properties.get(TYPE));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -133,4 +133,4 @@ public class CreateDataSyncJobStmt extends DdlStmt {
|
||||
public DataSyncJobType getDataSyncJobType() {
|
||||
return dataSyncJobType;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -47,7 +47,7 @@ public class DescriptorTable {
|
||||
private final HashMap<TupleId, TupleDescriptor> tupleDescs = new HashMap<TupleId, TupleDescriptor>();
|
||||
// List of referenced tables with no associated TupleDescriptor to ship to the BE.
|
||||
// For example, the output table of an insert query.
|
||||
private final List<Table> referencedTables = new ArrayList<Table>();;
|
||||
private final List<Table> referencedTables = new ArrayList<Table>();
|
||||
private final IdGenerator<TupleId> tupleIdGenerator_ = TupleId.createGenerator();
|
||||
private final IdGenerator<SlotId> slotIdGenerator_ = SlotId.createGenerator();
|
||||
private final HashMap<SlotId, SlotDescriptor> slotDescs = Maps.newHashMap();
|
||||
|
||||
@ -56,4 +56,4 @@ public class JobName {
|
||||
sb.append("`").append(dbName).append("`.`").append(jobName).append("`");
|
||||
return sb.toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -53,4 +53,4 @@ public class PauseSyncJobStmt extends DdlStmt {
|
||||
stringBuilder.append(jobName.toSql());
|
||||
return stringBuilder.toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -53,4 +53,4 @@ public class ResumeSyncJobStmt extends DdlStmt {
|
||||
stringBuilder.append(jobName.toSql());
|
||||
return stringBuilder.toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -94,4 +94,4 @@ public class ShowSyncJobStmt extends ShowStmt {
|
||||
public RedirectStatus getRedirectStatus() {
|
||||
return RedirectStatus.FORWARD_NO_SYNC;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -51,7 +51,7 @@ public class ShowViewStmt extends ShowStmt {
|
||||
private String db;
|
||||
private TableName tbl;
|
||||
|
||||
private List<View> matchViews = Lists.newArrayList();;
|
||||
private List<View> matchViews = Lists.newArrayList();
|
||||
|
||||
public ShowViewStmt(String db, TableName tbl) {
|
||||
this.db = db;
|
||||
|
||||
@ -327,7 +327,7 @@ public class StmtRewriter {
|
||||
private static boolean hasSubqueryInDisjunction(Expr expr) {
|
||||
if (!(expr instanceof CompoundPredicate)) {
|
||||
return false;
|
||||
};
|
||||
}
|
||||
if (Expr.IS_OR_PREDICATE.apply(expr)) {
|
||||
return expr.contains(Subquery.class);
|
||||
}
|
||||
|
||||
@ -53,4 +53,4 @@ public class StopSyncJobStmt extends DdlStmt {
|
||||
stringBuilder.append(jobName.toSql());
|
||||
return stringBuilder.toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -32,4 +32,4 @@ public class SyncStmt extends DdlStmt {
|
||||
public RedirectStatus getRedirectStatus() {
|
||||
return RedirectStatus.FORWARD_WITH_SYNC;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -42,4 +42,4 @@ public class TransactionBeginStmt extends TransactionStmt {
|
||||
super.analyze(analyzer);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -19,4 +19,4 @@ package org.apache.doris.analysis;
|
||||
|
||||
public class TransactionCommitStmt extends TransactionStmt {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -19,4 +19,4 @@ package org.apache.doris.analysis;
|
||||
|
||||
public class TransactionRollbackStmt extends TransactionStmt {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -31,4 +31,4 @@ public class TransactionStmt extends StatementBase {
|
||||
public void analyze(Analyzer analyzer) throws AnalysisException, UserException {
|
||||
super.analyze(analyzer);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -1743,7 +1743,7 @@ public class RestoreJob extends AbstractJob {
|
||||
out.writeLong(entry.getKey());
|
||||
out.writeLong(entry.getValue());
|
||||
// It is version hash in the past, but it useless but should compatible with old version so that write 0 here
|
||||
out.writeLong(0l);
|
||||
out.writeLong(0L);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -439,7 +439,7 @@ public class CatalogRecycleBin extends MasterDaemon implements Writable {
|
||||
if (partitionInfo.getType() == PartitionType.RANGE) {
|
||||
recoverItem = new RangePartitionItem(recoverRange);
|
||||
} else if (partitionInfo.getType() == PartitionType.LIST) {
|
||||
recoverItem = recoverPartitionInfo.getListPartitionItem();;
|
||||
recoverItem = recoverPartitionInfo.getListPartitionItem();
|
||||
}
|
||||
// check if partition item is invalid
|
||||
if (partitionInfo.getAnyIntersectItem(recoverItem, false) != null) {
|
||||
|
||||
@ -142,7 +142,7 @@ public class HashDistributionInfo extends DistributionInfo {
|
||||
}
|
||||
builder.append("]; ");
|
||||
|
||||
builder.append("bucket num: ").append(bucketNum).append("; ");;
|
||||
builder.append("bucket num: ").append(bucketNum).append("; ");
|
||||
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
@ -68,4 +68,4 @@ public class MetaReplayState {
|
||||
return resultMap;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -76,4 +76,4 @@ public class MultiRowType extends Type {
|
||||
structStr = structStr.substring(lpad);
|
||||
return String.format("%sARRAY<%s>", leftPadding, structStr);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -57,7 +57,7 @@ public class TempPartitions implements Writable, GsonPostProcessable {
|
||||
nameToPartition.put(partition.getName(), partition);
|
||||
}
|
||||
public long getUpdateTime() {
|
||||
long updateTime = -1l;
|
||||
long updateTime = -1L;
|
||||
for (Partition p : idToPartition.values()) {
|
||||
if (p.getVisibleVersionTime() > updateTime) {
|
||||
updateTime = p.getVisibleVersionTime();
|
||||
|
||||
@ -52,4 +52,4 @@ public class DefaultDorisLogger extends ExtendedLoggerWrapper implements Taggabl
|
||||
super.logMessage(fqcn, level, marker, m, t);
|
||||
tags.next = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -58,4 +58,4 @@ public class DeleteInfoProcDir implements ProcNodeInterface {
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -113,4 +113,4 @@ public class NetUtils {
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -24,4 +24,4 @@ public enum FrontendNodeType {
|
||||
REPLICA,
|
||||
INIT,
|
||||
UNKNOWN
|
||||
}
|
||||
}
|
||||
|
||||
@ -30,4 +30,4 @@ public class IllegalArgException extends Exception {
|
||||
public IllegalArgException(String msg, Throwable cause) {
|
||||
super(msg, cause);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -158,7 +158,6 @@ public class ShowAction extends RestBaseController {
|
||||
parentThread.getParent() != null;
|
||||
parentThread = parentThread.getParent()) {
|
||||
}
|
||||
;
|
||||
feInfo.put("thread_cnt", String.valueOf(parentThread.activeCount()));
|
||||
|
||||
return ResponseEntityBuilder.ok(feInfo);
|
||||
|
||||
@ -225,7 +225,7 @@ public class TableQueryPlanAction extends RestBaseController {
|
||||
Map<String, Node> tabletRoutings = assemblePrunedPartitions(scanRangeLocations);
|
||||
tabletRoutings.forEach((tabletId, node) -> {
|
||||
long tablet = Long.parseLong(tabletId);
|
||||
tablet_info.put(tablet, new TTabletVersionInfo(tablet, node.version, 0l /*version hash*/, node.schemaHash));
|
||||
tablet_info.put(tablet, new TTabletVersionInfo(tablet, node.version, 0L /*version hash*/, node.schemaHash));
|
||||
});
|
||||
tQueryPlanInfo.tablet_info = tablet_info;
|
||||
|
||||
|
||||
@ -336,4 +336,4 @@ public class QueryProfileAction extends RestBaseController {
|
||||
}
|
||||
return ResponseEntityBuilder.ok(graph);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -207,4 +207,4 @@ public class LdapClient {
|
||||
private static String getUserFilter(String userFilter, String userName) {
|
||||
return userFilter.replaceAll("\\{login}", userName);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -489,7 +489,6 @@ public class LoadJob implements Writable {
|
||||
public void setHadoopEtlJobId(String etlJobId) {
|
||||
if (etlJobType == EtlJobType.HADOOP) {
|
||||
((HadoopEtlJobInfo) etlJobInfo).setEtlJobId(etlJobId);
|
||||
;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -63,7 +63,7 @@ public class PartitionLoadInfo implements Writable {
|
||||
public void write(DataOutput out) throws IOException {
|
||||
out.writeLong(version);
|
||||
// Versionhash useless just for compatible
|
||||
out.writeLong(0l);
|
||||
out.writeLong(0L);
|
||||
|
||||
int count = 0;
|
||||
if (sources == null) {
|
||||
|
||||
@ -55,10 +55,6 @@ import com.google.common.collect.Lists;
|
||||
import com.google.common.collect.Maps;
|
||||
import com.google.common.collect.Sets;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
import org.apache.logging.log4j.LogManager;
|
||||
import org.apache.logging.log4j.Logger;
|
||||
|
||||
import java.io.DataInput;
|
||||
import java.io.DataOutput;
|
||||
import java.io.IOException;
|
||||
|
||||
@ -102,4 +102,4 @@ public class SyncChannel {
|
||||
public void setPartitions(PartitionNames partitionNames) {
|
||||
this.partitionNames = partitionNames;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -23,4 +23,4 @@ public interface SyncChannelCallback {
|
||||
|
||||
public void onFailed(String errMsg);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -55,4 +55,4 @@ public class SyncChannelHandle implements SyncChannelCallback {
|
||||
public Status getStatus() {
|
||||
return latch.getStatus();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -47,4 +47,4 @@ public class SyncDataConsumer extends SyncLifeCycle {
|
||||
@Override
|
||||
public void process() {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -33,4 +33,4 @@ public class SyncDataReceiver extends SyncLifeCycle {
|
||||
public void process() {
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -91,4 +91,4 @@ public class SyncFailMsg implements Writable {
|
||||
return msgType.equals(other.msgType)
|
||||
&& msg.equals(other.msg);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -467,4 +467,4 @@ public abstract class SyncJob implements Writable {
|
||||
public long getFinishTimeMs() {
|
||||
return finishTimeMs;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -74,4 +74,4 @@ public abstract class SyncLifeCycle {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -62,4 +62,4 @@ public class SyncTxnParam {
|
||||
public Backend getBackend() {
|
||||
return backend;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -24,4 +24,4 @@ public class CanalConfigs {
|
||||
|
||||
// Maximal waiting time for consumer to poll one batch
|
||||
public static long pollWaitingTimeoutMs = 80L;
|
||||
}
|
||||
}
|
||||
|
||||
@ -472,4 +472,4 @@ public class CanalSyncDataConsumer extends SyncDataConsumer {
|
||||
private void releaseGetLock() {
|
||||
getLock.unlock();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -113,4 +113,4 @@ public class CanalSyncDataReceiver extends SyncDataReceiver {
|
||||
private void releaseGetLock() {
|
||||
getLock.unlock();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -234,4 +234,4 @@ public class CanalUtils {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -113,4 +113,4 @@ public class SyncCanalClient {
|
||||
public String getPositionInfo() {
|
||||
return consumer.getPositionInfo();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -49,4 +49,4 @@ public class Data<T> {
|
||||
public boolean isNotEmpty() {
|
||||
return datas.size() > 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -70,4 +70,4 @@ public class Events<T, P> {
|
||||
public long getMemSize() {
|
||||
return this.memSize;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -173,4 +173,4 @@ public class EntryPosition {
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -95,4 +95,4 @@ public class PositionMeta<T> {
|
||||
this.batches.clear();
|
||||
this.commitPositions.clear();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -85,4 +85,4 @@ public class PositionRange<T> {
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -82,7 +82,7 @@ public class PaloAuth implements Writable {
|
||||
private TablePrivTable tablePrivTable = new TablePrivTable();
|
||||
private ResourcePrivTable resourcePrivTable = new ResourcePrivTable();
|
||||
|
||||
private RoleManager roleManager = new RoleManager();;
|
||||
private RoleManager roleManager = new RoleManager();
|
||||
private UserPropertyMgr propertyMgr = new UserPropertyMgr();
|
||||
|
||||
private LdapInfo ldapInfo = new LdapInfo();
|
||||
|
||||
@ -88,4 +88,4 @@ public class RefreshExternalTableInfo implements Writable {
|
||||
return (dbName.equals(info.dbName))
|
||||
&& (tableName.equals(info.tableName)) && (newSchema.equals(newSchema));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -409,4 +409,4 @@ public class GsonUtils {
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -321,4 +321,4 @@ public final class RuntimeTypeAdapterFactory<T> implements TypeAdapterFactory {
|
||||
}
|
||||
}.nullSafe();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -71,4 +71,4 @@ public class OdbcTableSink extends DataSink {
|
||||
public DataPartition getOutputPartition() {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -454,4 +454,4 @@ public final class RuntimeFilter {
|
||||
Joiner.on(", ").join(targets) + " " +
|
||||
"Selectivity: " + getSelectivity();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -199,4 +199,4 @@ class PluginZip {
|
||||
InputStream getInputStreamFromUrl(String url) throws IOException {
|
||||
return Util.getInputStreamFromUrl(url, null, HTTP_TIMEOUT_MS, HTTP_TIMEOUT_MS);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -23,7 +23,6 @@ import java.util.Iterator;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import org.apache.doris.qe.QueryDetail;
|
||||
|
||||
// Queue of QueryDetail.
|
||||
// It's used to collect queries for monitor.
|
||||
|
||||
@ -562,7 +562,6 @@ public class PartitionRange {
|
||||
return null;
|
||||
}
|
||||
PartitionColumnFilter partitionColumnFilter = new PartitionColumnFilter();
|
||||
;
|
||||
for (Expr expr : partitionKeyPredicate.getChildren()) {
|
||||
if (expr instanceof BinaryPredicate) {
|
||||
BinaryPredicate binPredicate = (BinaryPredicate) expr;
|
||||
|
||||
@ -30,4 +30,4 @@ public @interface FEFunction {
|
||||
String[] argTypes();
|
||||
|
||||
String returnType();
|
||||
}
|
||||
}
|
||||
|
||||
@ -44,7 +44,7 @@ public class CheckConsistencyTask extends AgentTask {
|
||||
}
|
||||
|
||||
public TCheckConsistencyReq toThrift() {
|
||||
TCheckConsistencyReq request = new TCheckConsistencyReq(tabletId, schemaHash, version, 0l);
|
||||
TCheckConsistencyReq request = new TCheckConsistencyReq(tabletId, schemaHash, version, 0L);
|
||||
return request;
|
||||
}
|
||||
}
|
||||
|
||||
@ -151,4 +151,4 @@ public class UpdateTabletMetaInfoTask extends AgentTask {
|
||||
updateTabletMetaInfoReq.setTabletMetaInfos(metaInfos);
|
||||
return updateTabletMetaInfoReq;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -30,4 +30,4 @@ public class IllegalTransactionParameterException extends UserException {
|
||||
public IllegalTransactionParameterException(String msg, Throwable e) {
|
||||
super(msg, e);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -122,4 +122,4 @@ public class AlterTableStmtTest {
|
||||
stmt.toSql());
|
||||
Assert.assertEquals("testCluster:testDb", stmt.getTbl().getDb());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -123,4 +123,4 @@ public class BinaryPredicateTest {
|
||||
Assert.assertFalse(range.hasLowerBound());
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -44,4 +44,4 @@ public class ColumnPositionTest {
|
||||
pos.analyze();
|
||||
Assert.fail("No exception throws.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -180,4 +180,4 @@ public class CreateDataSyncJobStmtTest {
|
||||
} catch (UserException e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -86,4 +86,4 @@ public class CreateDbStmtTest {
|
||||
stmt.analyze(analyzer);
|
||||
Assert.fail("No exception throws.");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -49,4 +49,4 @@ public class CreateIndexClauseTest {
|
||||
clause.analyze(analyzer);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -323,4 +323,4 @@ public class BrokerUtilTest {
|
||||
Assert.fail(e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -409,4 +409,4 @@ public class CanalSyncJobTest {
|
||||
Assert.fail(e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -91,4 +91,4 @@ public class CanalTestUtil {
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -118,4 +118,4 @@ public class AuditEventProcessorTest {
|
||||
long total = System.currentTimeMillis() - start;
|
||||
System.out.println("total(ms): " + total + ", avg: " + total / 10000.0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user