You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@doris.apache.org by mo...@apache.org on 2020/08/28 05:28:29 UTC
[incubator-doris] branch master updated: [Refactor] Use camelCase
in thrift generated java sources (#4443)
This is an automated email from the ASF dual-hosted git repository.
morningman pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-doris.git
The following commit(s) were added to refs/heads/master by this push:
new 3b7614e [Refactor] Use camelCase in thrift generated java sources (#4443)
3b7614e is described below
commit 3b7614e174d3999e18056d6d741641d664c52908
Author: Zhengguo Yang <ya...@gmail.com>
AuthorDate: Fri Aug 28 13:28:11 2020 +0800
[Refactor] Use camelCase in thrift generated java sources (#4443)
Use camelCase in thrift generated java sources to make us fe's code style is more unified
---
fe/fe-core/pom.xml | 1 +
.../java/org/apache/doris/alter/RollupJob.java | 12 +-
.../org/apache/doris/alter/SchemaChangeJob.java | 14 +--
.../org/apache/doris/analysis/AnalyticWindow.java | 6 +-
.../java/org/apache/doris/analysis/Analyzer.java | 2 +-
.../org/apache/doris/analysis/ArithmeticExpr.java | 2 +-
.../org/apache/doris/analysis/BinaryPredicate.java | 4 +-
.../doris/analysis/BuiltinAggregateFunction.java | 2 +-
.../java/org/apache/doris/analysis/CastExpr.java | 4 +-
.../main/java/org/apache/doris/analysis/Expr.java | 2 +-
.../apache/doris/analysis/FunctionCallExpr.java | 2 +-
.../org/apache/doris/analysis/FunctionName.java | 6 +-
.../org/apache/doris/analysis/InPredicate.java | 2 +-
.../org/apache/doris/analysis/OutFileClause.java | 8 +-
.../java/org/apache/doris/analysis/SlotRef.java | 2 +-
.../doris/analysis/TupleIsNullPredicate.java | 2 +-
.../org/apache/doris/analysis/UserIdentity.java | 2 +-
.../java/org/apache/doris/backup/BackupJob.java | 22 ++--
.../java/org/apache/doris/backup/RestoreJob.java | 12 +-
.../apache/doris/catalog/AggregateFunction.java | 22 ++--
.../main/java/org/apache/doris/catalog/Column.java | 14 +--
.../java/org/apache/doris/catalog/Function.java | 10 +-
.../main/java/org/apache/doris/catalog/Index.java | 4 +-
.../org/apache/doris/catalog/ScalarFunction.java | 8 +-
.../java/org/apache/doris/catalog/ScalarType.java | 6 +-
.../java/org/apache/doris/catalog/StructType.java | 2 +-
.../apache/doris/catalog/TabletInvertedIndex.java | 46 +++----
.../org/apache/doris/catalog/TabletStatMgr.java | 8 +-
.../main/java/org/apache/doris/catalog/Type.java | 10 +-
.../org/apache/doris/clone/TabletSchedCtx.java | 34 ++---
.../main/java/org/apache/doris/common/Status.java | 2 +-
.../common/publish/ClusterStatePublisher.java | 8 +-
.../doris/common/publish/ClusterStateUpdate.java | 2 +-
.../java/org/apache/doris/load/DppScheduler.java | 22 ++--
.../main/java/org/apache/doris/load/ExportJob.java | 2 +-
.../src/main/java/org/apache/doris/load/Load.java | 2 +-
.../java/org/apache/doris/load/LoadErrorHub.java | 4 +-
.../org/apache/doris/load/loadv2/MiniLoadJob.java | 12 +-
.../org/apache/doris/load/loadv2/SparkLoadJob.java | 26 ++--
.../doris/load/routineload/KafkaTaskInfo.java | 18 +--
.../load/routineload/RoutineLoadTaskScheduler.java | 8 +-
.../java/org/apache/doris/master/MasterImpl.java | 112 ++++++++---------
.../org/apache/doris/master/ReportHandler.java | 64 +++++-----
.../org/apache/doris/planner/AggregationNode.java | 6 +-
.../org/apache/doris/planner/AnalyticEvalNode.java | 16 +--
.../apache/doris/planner/AssertNumRowsNode.java | 4 +-
.../org/apache/doris/planner/BrokerScanNode.java | 26 ++--
.../java/org/apache/doris/planner/CsvScanNode.java | 20 +--
.../org/apache/doris/planner/DataPartition.java | 4 +-
.../org/apache/doris/planner/DataSplitSink.java | 10 +-
.../org/apache/doris/planner/DataStreamSink.java | 2 +-
.../java/org/apache/doris/planner/EsScanNode.java | 14 +--
.../org/apache/doris/planner/ExchangeNode.java | 4 +-
.../java/org/apache/doris/planner/ExportSink.java | 4 +-
.../org/apache/doris/planner/HashJoinNode.java | 6 +-
.../org/apache/doris/planner/LoadScanNode.java | 14 +--
.../org/apache/doris/planner/MergeJoinNode.java | 4 +-
.../org/apache/doris/planner/MysqlTableSink.java | 2 +-
.../org/apache/doris/planner/OlapRewriteNode.java | 6 +-
.../org/apache/doris/planner/OlapScanNode.java | 16 +--
.../org/apache/doris/planner/OlapTableSink.java | 52 ++++----
.../org/apache/doris/planner/PlanFragment.java | 8 +-
.../java/org/apache/doris/planner/PlanNode.java | 4 +-
.../java/org/apache/doris/planner/ResultSink.java | 6 +-
.../org/apache/doris/planner/SchemaScanNode.java | 4 +-
.../apache/doris/planner/SingleNodePlanner.java | 2 +-
.../java/org/apache/doris/planner/SortNode.java | 10 +-
.../apache/doris/planner/StreamLoadPlanner.java | 36 +++---
.../apache/doris/planner/StreamLoadScanNode.java | 18 +--
.../java/org/apache/doris/qe/ConnectProcessor.java | 40 +++---
.../main/java/org/apache/doris/qe/Coordinator.java | 100 +++++++--------
.../java/org/apache/doris/qe/MasterOpExecutor.java | 16 +--
.../java/org/apache/doris/qe/SessionVariable.java | 28 ++---
.../java/org/apache/doris/qe/cache/CacheProxy.java | 4 +-
.../apache/doris/service/FrontendServiceImpl.java | 138 ++++++++++-----------
.../main/java/org/apache/doris/system/Backend.java | 16 +--
.../java/org/apache/doris/system/HeartbeatMgr.java | 30 ++---
.../java/org/apache/doris/task/AgentBatchTask.java | 48 +++----
.../java/org/apache/doris/task/AgentClient.java | 16 +--
.../org/apache/doris/task/AlterReplicaTask.java | 10 +-
.../main/java/org/apache/doris/task/CloneTask.java | 14 +--
.../org/apache/doris/task/CreateReplicaTask.java | 40 +++---
.../org/apache/doris/task/CreateRollupTask.java | 28 ++---
.../java/org/apache/doris/task/DownloadTask.java | 2 +-
.../org/apache/doris/task/DropReplicaTask.java | 2 +-
.../org/apache/doris/task/ExportPendingTask.java | 20 +--
.../apache/doris/task/HadoopLoadPendingTask.java | 2 +-
.../org/apache/doris/task/LoadPendingTask.java | 4 +-
.../org/apache/doris/task/MiniLoadEtlTask.java | 14 +--
.../org/apache/doris/task/MiniLoadPendingTask.java | 26 ++--
.../main/java/org/apache/doris/task/PushTask.java | 32 ++---
.../org/apache/doris/task/SchemaChangeTask.java | 28 ++---
.../java/org/apache/doris/task/SnapshotTask.java | 6 +-
.../java/org/apache/doris/task/StreamLoadTask.java | 16 +--
.../doris/task/UpdateTabletMetaInfoTask.java | 24 ++--
.../java/org/apache/doris/task/UploadTask.java | 2 +-
.../doris/transaction/PublishVersionDaemon.java | 2 +-
.../java/org/apache/doris/alter/AlterTest.java | 1 +
.../org/apache/doris/backup/BackupHandlerTest.java | 27 ++--
.../org/apache/doris/backup/BackupJobTest.java | 13 +-
.../org/apache/doris/backup/RestoreJobTest.java | 12 +-
.../java/org/apache/doris/catalog/BackendTest.java | 15 ++-
.../org/apache/doris/common/GenericPoolTest.java | 46 +++----
.../doris/planner/DistributedPlannerTest.java | 6 +-
.../org/apache/doris/planner/QueryPlanTest.java | 136 ++++++++++----------
.../java/org/apache/doris/qe/CoordinatorTest.java | 20 +--
.../org/apache/doris/qe/SimpleSchedulerTest.java | 4 +-
.../java/org/apache/doris/task/AgentTaskTest.java | 24 ++--
.../transaction/GlobalTransactionMgrTest.java | 4 +
.../apache/doris/utframe/MockedBackendFactory.java | 48 +++----
110 files changed, 968 insertions(+), 947 deletions(-)
diff --git a/fe/fe-core/pom.xml b/fe/fe-core/pom.xml
index c5892fe..bcb9804 100644
--- a/fe/fe-core/pom.xml
+++ b/fe/fe-core/pom.xml
@@ -479,6 +479,7 @@ under the License.
<configuration>
<thriftExecutable>${doris.thridparty}/installed/bin/thrift</thriftExecutable>
<thriftSourceRoot>${doris.home}/gensrc/thrift</thriftSourceRoot>
+ <generator>java:fullcamel</generator>
</configuration>
<executions>
<execution>
diff --git a/fe/fe-core/src/main/java/org/apache/doris/alter/RollupJob.java b/fe/fe-core/src/main/java/org/apache/doris/alter/RollupJob.java
index dde8a7b..5cd474b 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/alter/RollupJob.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/alter/RollupJob.java
@@ -574,7 +574,7 @@ public class RollupJob extends AlterJob {
}
Preconditions.checkState(rollupIndex.getState() == IndexState.ROLLUP);
- Preconditions.checkArgument(finishTabletInfo.getTablet_id() == rollupTabletId);
+ Preconditions.checkArgument(finishTabletInfo.getTabletId() == rollupTabletId);
Tablet rollupTablet = rollupIndex.getTablet(rollupTabletId);
if (rollupTablet == null) {
throw new MetaNotFoundException("Cannot find rollup tablet[" + rollupTabletId + "]");
@@ -591,15 +591,15 @@ public class RollupJob extends AlterJob {
}
long version = finishTabletInfo.getVersion();
- long versionHash = finishTabletInfo.getVersion_hash();
- long dataSize = finishTabletInfo.getData_size();
- long rowCount = finishTabletInfo.getRow_count();
+ long versionHash = finishTabletInfo.getVersionHash();
+ long dataSize = finishTabletInfo.getDataSize();
+ long rowCount = finishTabletInfo.getRowCount();
// yiguolei: not check version here because the replica's first version will be set by rollup job
// the version is not set now
rollupReplica.updateVersionInfo(version, versionHash, dataSize, rowCount);
- if (finishTabletInfo.isSetPath_hash()) {
- rollupReplica.setPathHash(finishTabletInfo.getPath_hash());
+ if (finishTabletInfo.isSetPathHash()) {
+ rollupReplica.setPathHash(finishTabletInfo.getPathHash());
}
setReplicaFinished(partitionId, rollupReplicaId);
diff --git a/fe/fe-core/src/main/java/org/apache/doris/alter/SchemaChangeJob.java b/fe/fe-core/src/main/java/org/apache/doris/alter/SchemaChangeJob.java
index acdec62..df8b982 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/alter/SchemaChangeJob.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/alter/SchemaChangeJob.java
@@ -567,7 +567,7 @@ public class SchemaChangeJob extends AlterJob {
SchemaChangeTask schemaChangeTask = (SchemaChangeTask) task;
// check schema hash to avoid former schema change task try finishing current task
- int finishTabletInfoSchemaHash = finishTabletInfo.getSchema_hash();
+ int finishTabletInfoSchemaHash = finishTabletInfo.getSchemaHash();
int taskSchemaHash = schemaChangeTask.getSchemaHash();
if (finishTabletInfoSchemaHash != taskSchemaHash) {
throw new MetaNotFoundException("Schema hash is not equal[" + finishTabletInfoSchemaHash + "-"
@@ -605,7 +605,7 @@ public class SchemaChangeJob extends AlterJob {
}
Preconditions.checkState(materializedIndex.getState() == IndexState.SCHEMA_CHANGE);
- Preconditions.checkArgument(finishTabletInfo.getTablet_id() == tabletId);
+ Preconditions.checkArgument(finishTabletInfo.getTabletId() == tabletId);
Tablet tablet = materializedIndex.getTablet(tabletId);
if (tablet == null) {
throw new MetaNotFoundException("Cannot find tablet[" + tabletId + "]");
@@ -618,13 +618,13 @@ public class SchemaChangeJob extends AlterJob {
// replica's state may be NORMAL(due to clone), so no need to check
long version = finishTabletInfo.getVersion();
- long versionHash = finishTabletInfo.getVersion_hash();
- long dataSize = finishTabletInfo.getData_size();
- long rowCount = finishTabletInfo.getRow_count();
+ long versionHash = finishTabletInfo.getVersionHash();
+ long dataSize = finishTabletInfo.getDataSize();
+ long rowCount = finishTabletInfo.getRowCount();
// do not need check version > replica.getVersion, because the new replica's version is first set by sc
replica.updateVersionInfo(version, versionHash, dataSize, rowCount);
- if (finishTabletInfo.isSetPath_hash()) {
- replica.setPathHash(finishTabletInfo.getPath_hash());
+ if (finishTabletInfo.isSetPathHash()) {
+ replica.setPathHash(finishTabletInfo.getPathHash());
}
} finally {
db.writeUnlock();
diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/AnalyticWindow.java b/fe/fe-core/src/main/java/org/apache/doris/analysis/AnalyticWindow.java
index 1a6d220..a59750b 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/AnalyticWindow.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/AnalyticWindow.java
@@ -168,7 +168,7 @@ public class AnalyticWindow {
TAnalyticWindowBoundary result = new TAnalyticWindowBoundary(type.toThrift());
if (type.isOffset() && windowType == Type.ROWS) {
- result.setRows_offset_value(offsetValue.longValue());
+ result.setRowsOffsetValue(offsetValue.longValue());
}
// TODO: range windows need range_offset_predicate
@@ -297,13 +297,13 @@ public class AnalyticWindow {
TAnalyticWindow result = new TAnalyticWindow(type_.toThrift());
if (leftBoundary_.getType() != BoundaryType.UNBOUNDED_PRECEDING) {
- result.setWindow_start(leftBoundary_.toThrift(type_));
+ result.setWindowStart(leftBoundary_.toThrift(type_));
}
Preconditions.checkNotNull(rightBoundary_);
if (rightBoundary_.getType() != BoundaryType.UNBOUNDED_FOLLOWING) {
- result.setWindow_end(rightBoundary_.toThrift(type_));
+ result.setWindowEnd(rightBoundary_.toThrift(type_));
}
return result;
diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/Analyzer.java b/fe/fe-core/src/main/java/org/apache/doris/analysis/Analyzer.java
index 757b6e9..10c82a9 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/Analyzer.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/Analyzer.java
@@ -382,7 +382,7 @@ public class Analyzer {
TQueryGlobals queryGlobals = new TQueryGlobals();
Calendar currentDate = Calendar.getInstance();
String nowStr = formatter.format(currentDate.getTime());
- queryGlobals.setNow_string(nowStr);
+ queryGlobals.setNowString(nowStr);
return queryGlobals;
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/ArithmeticExpr.java b/fe/fe-core/src/main/java/org/apache/doris/analysis/ArithmeticExpr.java
index beaa3cb..d3c977a 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/ArithmeticExpr.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/ArithmeticExpr.java
@@ -169,7 +169,7 @@ public class ArithmeticExpr extends Expr {
msg.node_type = TExprNodeType.ARITHMETIC_EXPR;
if (!type.isDecimal() && !type.isDecimalV2()) {
msg.setOpcode(op.getOpcode());
- msg.setOutput_column(outputColumn);
+ msg.setOutputColumn(outputColumn);
}
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/BinaryPredicate.java b/fe/fe-core/src/main/java/org/apache/doris/analysis/BinaryPredicate.java
index 38068ce..ff5ccbf 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/BinaryPredicate.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/BinaryPredicate.java
@@ -238,8 +238,8 @@ public class BinaryPredicate extends Predicate implements Writable {
protected void toThrift(TExprNode msg) {
msg.node_type = TExprNodeType.BINARY_PRED;
msg.setOpcode(opcode);
- msg.setVector_opcode(vectorOpcode);
- msg.setChild_type(getChild(0).getType().getPrimitiveType().toThrift());
+ msg.setVectorOpcode(vectorOpcode);
+ msg.setChildType(getChild(0).getType().getPrimitiveType().toThrift());
}
@Override
diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/BuiltinAggregateFunction.java b/fe/fe-core/src/main/java/org/apache/doris/analysis/BuiltinAggregateFunction.java
index cb3803b..df01973 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/BuiltinAggregateFunction.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/BuiltinAggregateFunction.java
@@ -76,7 +76,7 @@ public class BuiltinAggregateFunction extends Function {
} else {
fn.setId(op_.thriftOp.ordinal());
}
- fn.setAggregate_fn(new TAggregateFunction(intermediateType_.toThrift()));
+ fn.setAggregateFn(new TAggregateFunction(intermediateType_.toThrift()));
return fn;
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/CastExpr.java b/fe/fe-core/src/main/java/org/apache/doris/analysis/CastExpr.java
index 4ee4741..aa39144 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/CastExpr.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/CastExpr.java
@@ -162,9 +162,9 @@ public class CastExpr extends Expr {
protected void toThrift(TExprNode msg) {
msg.node_type = TExprNodeType.CAST_EXPR;
msg.setOpcode(opcode);
- msg.setOutput_column(outputColumn);
+ msg.setOutputColumn(outputColumn);
if (type.isNativeType() && getChild(0).getType().isNativeType()) {
- msg.setChild_type(getChild(0).getType().getPrimitiveType().toThrift());
+ msg.setChildType(getChild(0).getType().getPrimitiveType().toThrift());
}
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/Expr.java b/fe/fe-core/src/main/java/org/apache/doris/analysis/Expr.java
index afe7e24..2717070 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/Expr.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/Expr.java
@@ -864,7 +864,7 @@ abstract public class Expr extends TreeNode<Expr> implements ParseNode, Cloneabl
if (fn != null) {
msg.setFn(fn.toThrift());
if (fn.hasVarArgs()) {
- msg.setVararg_start_idx(fn.getNumArgs() - 1);
+ msg.setVarargStartIdx(fn.getNumArgs() - 1);
}
}
msg.output_scale = getOutputScale();
diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/FunctionCallExpr.java b/fe/fe-core/src/main/java/org/apache/doris/analysis/FunctionCallExpr.java
index d0568db..35873a2 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/FunctionCallExpr.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/FunctionCallExpr.java
@@ -274,7 +274,7 @@ public class FunctionCallExpr extends Expr {
if (isAggregate() || isAnalyticFnCall) {
msg.node_type = TExprNodeType.AGG_EXPR;
if (!isAnalyticFnCall) {
- msg.setAgg_expr(new TAggregateExpr(isMergeAggFn));
+ msg.setAggExpr(new TAggregateExpr(isMergeAggFn));
}
} else {
msg.node_type = TExprNodeType.FUNCTION_CALL;
diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/FunctionName.java b/fe/fe-core/src/main/java/org/apache/doris/analysis/FunctionName.java
index c47e3c7..609ee8b 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/FunctionName.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/FunctionName.java
@@ -75,7 +75,7 @@ public class FunctionName implements Writable {
}
public static FunctionName fromThrift(TFunctionName fnName) {
- return new FunctionName(fnName.getDb_name(), fnName.getFunction_name());
+ return new FunctionName(fnName.getDbName(), fnName.getFunctionName());
}
@Override
@@ -176,8 +176,8 @@ public class FunctionName implements Writable {
public TFunctionName toThrift() {
TFunctionName name = new TFunctionName(fn_);
- name.setDb_name(db_);
- name.setFunction_name(fn_);
+ name.setDbName(db_);
+ name.setFunctionName(fn_);
return name;
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/InPredicate.java b/fe/fe-core/src/main/java/org/apache/doris/analysis/InPredicate.java
index 0b65469..c54ff49 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/InPredicate.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/InPredicate.java
@@ -230,7 +230,7 @@ public class InPredicate extends Predicate {
msg.in_predicate = new TInPredicate(isNotIn);
msg.node_type = TExprNodeType.IN_PRED;
msg.setOpcode(opcode);
- msg.setVector_opcode(vectorOpcode);
+ msg.setVectorOpcode(vectorOpcode);
}
@Override
diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/OutFileClause.java b/fe/fe-core/src/main/java/org/apache/doris/analysis/OutFileClause.java
index 1d2a905..1f67167 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/OutFileClause.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/OutFileClause.java
@@ -200,12 +200,12 @@ public class OutFileClause {
public TResultFileSinkOptions toSinkOptions() {
TResultFileSinkOptions sinkOptions = new TResultFileSinkOptions(filePath, fileFormatType);
if (isCsvFormat()) {
- sinkOptions.setColumn_separator(columnSeparator);
- sinkOptions.setLine_delimiter(lineDelimiter);
+ sinkOptions.setColumnSeparator(columnSeparator);
+ sinkOptions.setLineDelimiter(lineDelimiter);
}
- sinkOptions.setMax_file_size_bytes(maxFileSizeBytes);
+ sinkOptions.setMaxFileSizeBytes(maxFileSizeBytes);
if (brokerDesc != null) {
- sinkOptions.setBroker_properties(brokerDesc.getProperties());
+ sinkOptions.setBrokerProperties(brokerDesc.getProperties());
// broker_addresses of sinkOptions will be set in Coordinator.
// Because we need to choose the nearest broker with the result sink node.
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/SlotRef.java b/fe/fe-core/src/main/java/org/apache/doris/analysis/SlotRef.java
index 13cdd2d..b9e96c3 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/SlotRef.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/SlotRef.java
@@ -222,7 +222,7 @@ public class SlotRef extends Expr {
protected void toThrift(TExprNode msg) {
msg.node_type = TExprNodeType.SLOT_REF;
msg.slot_ref = new TSlotRef(desc.getId().asInt(), desc.getParent().getId().asInt());
- msg.setOutput_column(outputColumn);
+ msg.setOutputColumn(outputColumn);
}
@Override
diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/TupleIsNullPredicate.java b/fe/fe-core/src/main/java/org/apache/doris/analysis/TupleIsNullPredicate.java
index 3fb4556..2a7cb2b 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/TupleIsNullPredicate.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/TupleIsNullPredicate.java
@@ -66,7 +66,7 @@ public class TupleIsNullPredicate extends Predicate {
msg.node_type = TExprNodeType.TUPLE_IS_NULL_PRED;
msg.tuple_is_null_pred = new TTupleIsNullPredicate();
for (TupleId tid : tupleIds) {
- msg.tuple_is_null_pred.addToTuple_ids(tid.asInt());
+ msg.tuple_is_null_pred.addToTupleIds(tid.asInt());
}
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/analysis/UserIdentity.java b/fe/fe-core/src/main/java/org/apache/doris/analysis/UserIdentity.java
index c42058e..95fe6e4 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/analysis/UserIdentity.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/analysis/UserIdentity.java
@@ -160,7 +160,7 @@ public class UserIdentity implements Writable {
TUserIdentity tUserIdent = new TUserIdentity();
tUserIdent.setHost(host);
tUserIdent.setUsername(user);
- tUserIdent.setIs_domain(isDomain);
+ tUserIdent.setIsDomain(isDomain);
return tUserIdent;
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/backup/BackupJob.java b/fe/fe-core/src/main/java/org/apache/doris/backup/BackupJob.java
index 7c1a571..4f7be57 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/backup/BackupJob.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/backup/BackupJob.java
@@ -143,19 +143,19 @@ public class BackupJob extends AbstractJob {
public synchronized boolean finishTabletSnapshotTask(SnapshotTask task, TFinishTaskRequest request) {
Preconditions.checkState(task.getJobId() == jobId);
- if (request.getTask_status().getStatus_code() != TStatusCode.OK) {
- taskErrMsg.put(task.getSignature(), Joiner.on(",").join(request.getTask_status().getError_msgs()));
+ if (request.getTaskStatus().getStatusCode() != TStatusCode.OK) {
+ taskErrMsg.put(task.getSignature(), Joiner.on(",").join(request.getTaskStatus().getErrorMsgs()));
// snapshot task could not finish if status_code is OLAP_ERR_VERSION_ALREADY_MERGED,
// so cancel this job
- if (request.getTask_status().getStatus_code() == TStatusCode.OLAP_ERR_VERSION_ALREADY_MERGED) {
+ if (request.getTaskStatus().getStatusCode() == TStatusCode.OLAP_ERR_VERSION_ALREADY_MERGED) {
status = new Status(ErrCode.OLAP_VERSION_ALREADY_MERGED, "make snapshot failed, version already merged");
cancelInternal();
}
return false;
}
- Preconditions.checkState(request.isSetSnapshot_path());
- Preconditions.checkState(request.isSetSnapshot_files());
+ Preconditions.checkState(request.isSetSnapshotPath());
+ Preconditions.checkState(request.isSetSnapshotFiles());
// snapshot path does not contains last 'tablet_id' and 'schema_hash' dir
// eg:
// /path/to/your/be/data/snapshot/20180410102311.0.86400/
@@ -163,8 +163,8 @@ public class BackupJob extends AbstractJob {
// /path/to/your/be/data/snapshot/20180410102311.0.86400/10006/352781111/
SnapshotInfo info = new SnapshotInfo(task.getDbId(), task.getTableId(), task.getPartitionId(),
task.getIndexId(), task.getTabletId(), task.getBackendId(),
- task.getSchemaHash(), request.getSnapshot_path(),
- request.getSnapshot_files());
+ task.getSchemaHash(), request.getSnapshotPath(),
+ request.getSnapshotFiles());
snapshotInfos.put(task.getTabletId(), info);
taskProgress.remove(task.getTabletId());
@@ -179,13 +179,13 @@ public class BackupJob extends AbstractJob {
public synchronized boolean finishSnapshotUploadTask(UploadTask task, TFinishTaskRequest request) {
Preconditions.checkState(task.getJobId() == jobId);
- if (request.getTask_status().getStatus_code() != TStatusCode.OK) {
- taskErrMsg.put(task.getSignature(), Joiner.on(",").join(request.getTask_status().getError_msgs()));
+ if (request.getTaskStatus().getStatusCode() != TStatusCode.OK) {
+ taskErrMsg.put(task.getSignature(), Joiner.on(",").join(request.getTaskStatus().getErrorMsgs()));
return false;
}
- Preconditions.checkState(request.isSetTablet_files());
- Map<Long, List<String>> tabletFileMap = request.getTablet_files();
+ Preconditions.checkState(request.isSetTabletFiles());
+ Map<Long, List<String>> tabletFileMap = request.getTabletFiles();
if (tabletFileMap.isEmpty()) {
LOG.warn("upload snapshot files failed because nothing is uploaded. be: {}. {}",
task.getBackendId(), this);
diff --git a/fe/fe-core/src/main/java/org/apache/doris/backup/RestoreJob.java b/fe/fe-core/src/main/java/org/apache/doris/backup/RestoreJob.java
index 97d2e99..8b79bf0 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/backup/RestoreJob.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/backup/RestoreJob.java
@@ -176,7 +176,7 @@ public class RestoreJob extends AbstractJob {
return false;
}
- Preconditions.checkState(request.isSetSnapshot_path());
+ Preconditions.checkState(request.isSetSnapshotPath());
// snapshot path does not contains last 'tablet_id' and 'schema_hash' dir
// eg:
@@ -185,7 +185,7 @@ public class RestoreJob extends AbstractJob {
// /path/to/your/be/data/snapshot/20180410102311.0/10006/352781111/
SnapshotInfo info = new SnapshotInfo(task.getDbId(), task.getTableId(), task.getPartitionId(),
task.getIndexId(), task.getTabletId(), task.getBackendId(),
- task.getSchemaHash(), request.getSnapshot_path(), Lists.newArrayList());
+ task.getSchemaHash(), request.getSnapshotPath(), Lists.newArrayList());
snapshotInfos.put(task.getTabletId(), task.getBackendId(), info);
taskProgress.remove(task.getSignature());
@@ -206,9 +206,9 @@ public class RestoreJob extends AbstractJob {
return false;
}
- Preconditions.checkState(request.isSetDownloaded_tablet_ids());
+ Preconditions.checkState(request.isSetDownloadedTabletIds());
- for (Long tabletId : request.getDownloaded_tablet_ids()) {
+ for (Long tabletId : request.getDownloadedTabletIds()) {
SnapshotInfo info = snapshotInfos.get(tabletId, task.getBackendId());
if (info == null) {
LOG.error("failed to find snapshot infos of tablet {} in be {}, {}",
@@ -248,8 +248,8 @@ public class RestoreJob extends AbstractJob {
Preconditions.checkState(jobId == this.jobId);
Preconditions.checkState(dbId == task.getDbId());
- if (request.getTask_status().getStatus_code() != TStatusCode.OK) {
- taskErrMsg.put(task.getSignature(), Joiner.on(",").join(request.getTask_status().getError_msgs()));
+ if (request.getTaskStatus().getStatusCode() != TStatusCode.OK) {
+ taskErrMsg.put(task.getSignature(), Joiner.on(",").join(request.getTaskStatus().getErrorMsgs()));
return true;
}
return false;
diff --git a/fe/fe-core/src/main/java/org/apache/doris/catalog/AggregateFunction.java b/fe/fe-core/src/main/java/org/apache/doris/catalog/AggregateFunction.java
index 34e1416..ed8ce6b 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/catalog/AggregateFunction.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/catalog/AggregateFunction.java
@@ -383,29 +383,29 @@ public class AggregateFunction extends Function {
public TFunction toThrift() {
TFunction fn = super.toThrift();
TAggregateFunction aggFn = new TAggregateFunction();
- aggFn.setIs_analytic_only_fn(isAnalyticFn && !isAggregateFn);
- aggFn.setUpdate_fn_symbol(updateFnSymbol);
- aggFn.setInit_fn_symbol(initFnSymbol);
+ aggFn.setIsAnalyticOnlyFn(isAnalyticFn && !isAggregateFn);
+ aggFn.setUpdateFnSymbol(updateFnSymbol);
+ aggFn.setInitFnSymbol(initFnSymbol);
if (serializeFnSymbol != null) {
- aggFn.setSerialize_fn_symbol(serializeFnSymbol);
+ aggFn.setSerializeFnSymbol(serializeFnSymbol);
}
- aggFn.setMerge_fn_symbol(mergeFnSymbol);
+ aggFn.setMergeFnSymbol(mergeFnSymbol);
if (getValueFnSymbol != null) {
- aggFn.setGet_value_fn_symbol(getValueFnSymbol);
+ aggFn.setGetValueFnSymbol(getValueFnSymbol);
}
if (removeFnSymbol != null) {
- aggFn.setRemove_fn_symbol(removeFnSymbol);
+ aggFn.setRemoveFnSymbol(removeFnSymbol);
}
if (finalizeFnSymbol != null) {
- aggFn.setFinalize_fn_symbol(finalizeFnSymbol);
+ aggFn.setFinalizeFnSymbol(finalizeFnSymbol);
}
if (intermediateType != null) {
- aggFn.setIntermediate_type(intermediateType.toThrift());
+ aggFn.setIntermediateType(intermediateType.toThrift());
} else {
- aggFn.setIntermediate_type(getReturnType().toThrift());
+ aggFn.setIntermediateType(getReturnType().toThrift());
}
// agg_fn.setIgnores_distinct(ignoresDistinct);
- fn.setAggregate_fn(aggFn);
+ fn.setAggregateFn(aggFn);
return fn;
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/catalog/Column.java b/fe/fe-core/src/main/java/org/apache/doris/catalog/Column.java
index 7c37de9..befc8ca 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/catalog/Column.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/catalog/Column.java
@@ -263,7 +263,7 @@ public class Column implements Writable {
public TColumn toThrift() {
TColumn tColumn = new TColumn();
- tColumn.setColumn_name(this.name);
+ tColumn.setColumnName(this.name);
TColumnType tColumnType = new TColumnType();
tColumnType.setType(this.getDataType().toThrift());
@@ -271,15 +271,15 @@ public class Column implements Writable {
tColumnType.setPrecision(this.getPrecision());
tColumnType.setScale(this.getScale());
- tColumnType.setIndex_len(this.getOlapColumnIndexSize());
+ tColumnType.setIndexLen(this.getOlapColumnIndexSize());
- tColumn.setColumn_type(tColumnType);
+ tColumn.setColumnType(tColumnType);
if (null != this.aggregationType) {
- tColumn.setAggregation_type(this.aggregationType.toThrift());
+ tColumn.setAggregationType(this.aggregationType.toThrift());
}
- tColumn.setIs_key(this.isKey);
- tColumn.setIs_allow_null(this.isAllowNull);
- tColumn.setDefault_value(this.defaultValue);
+ tColumn.setIsKey(this.isKey);
+ tColumn.setIsAllowNull(this.isAllowNull);
+ tColumn.setDefaultValue(this.defaultValue);
tColumn.setVisible(visible);
// The define expr does not need to be serialized here for now.
// At present, only serialized(analyzed) define expr is directly used when creating a materialized view.
diff --git a/fe/fe-core/src/main/java/org/apache/doris/catalog/Function.java b/fe/fe-core/src/main/java/org/apache/doris/catalog/Function.java
index 52d36a5..425c39c 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/catalog/Function.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/catalog/Function.java
@@ -421,13 +421,13 @@ public class Function implements Writable {
TFunction fn = new TFunction();
fn.setSignature(signatureString());
fn.setName(name.toThrift());
- fn.setBinary_type(binaryType);
+ fn.setBinaryType(binaryType);
if (location != null) {
- fn.setHdfs_location(location.toString());
+ fn.setHdfsLocation(location.toString());
}
- fn.setArg_types(Type.toThrift(argTypes));
- fn.setRet_type(getReturnType().toThrift());
- fn.setHas_var_args(hasVarArgs);
+ fn.setArgTypes(Type.toThrift(argTypes));
+ fn.setRetType(getReturnType().toThrift());
+ fn.setHasVarArgs(hasVarArgs);
// TODO: Comment field is missing?
// fn.setComment(comment)
fn.setId(id);
diff --git a/fe/fe-core/src/main/java/org/apache/doris/catalog/Index.java b/fe/fe-core/src/main/java/org/apache/doris/catalog/Index.java
index d02915d..b5536fa 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/catalog/Index.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/catalog/Index.java
@@ -141,9 +141,9 @@ public class Index implements Writable {
public TOlapTableIndex toThrift() {
TOlapTableIndex tIndex = new TOlapTableIndex();
- tIndex.setIndex_name(indexName);
+ tIndex.setIndexName(indexName);
tIndex.setColumns(columns);
- tIndex.setIndex_type(TIndexType.valueOf(indexType.toString()));
+ tIndex.setIndexType(TIndexType.valueOf(indexType.toString()));
if (columns != null) {
tIndex.setComment(comment);
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/catalog/ScalarFunction.java b/fe/fe-core/src/main/java/org/apache/doris/catalog/ScalarFunction.java
index 7f0aba2..5eff1e8 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/catalog/ScalarFunction.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/catalog/ScalarFunction.java
@@ -267,13 +267,13 @@ public class ScalarFunction extends Function {
@Override
public TFunction toThrift() {
TFunction fn = super.toThrift();
- fn.setScalar_fn(new TScalarFunction());
- fn.getScalar_fn().setSymbol(symbolName);
+ fn.setScalarFn(new TScalarFunction());
+ fn.getScalarFn().setSymbol(symbolName);
if (prepareFnSymbol != null) {
- fn.getScalar_fn().setPrepare_fn_symbol(prepareFnSymbol);
+ fn.getScalarFn().setPrepareFnSymbol(prepareFnSymbol);
}
if (closeFnSymbol != null) {
- fn.getScalar_fn().setClose_fn_symbol(closeFnSymbol);
+ fn.getScalarFn().setCloseFnSymbol(closeFnSymbol);
}
return fn;
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/catalog/ScalarType.java b/fe/fe-core/src/main/java/org/apache/doris/catalog/ScalarType.java
index 5805bd9..532dfa3 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/catalog/ScalarType.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/catalog/ScalarType.java
@@ -368,7 +368,7 @@ public class ScalarType extends Type {
TScalarType scalarType = new TScalarType();
scalarType.setType(type.toThrift());
scalarType.setLen(len);
- node.setScalar_type(scalarType);
+ node.setScalarType(scalarType);
break;
}
case DECIMAL:
@@ -378,14 +378,14 @@ public class ScalarType extends Type {
scalarType.setType(type.toThrift());
scalarType.setScale(scale);
scalarType.setPrecision(precision);
- node.setScalar_type(scalarType);
+ node.setScalarType(scalarType);
break;
}
default: {
node.setType(TTypeNodeType.SCALAR);
TScalarType scalarType = new TScalarType();
scalarType.setType(type.toThrift());
- node.setScalar_type(scalarType);
+ node.setScalarType(scalarType);
break;
}
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/catalog/StructType.java b/fe/fe-core/src/main/java/org/apache/doris/catalog/StructType.java
index 4e04678..b9f2ccb 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/catalog/StructType.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/catalog/StructType.java
@@ -109,7 +109,7 @@ public class StructType extends Type {
Preconditions.checkNotNull(fields);
Preconditions.checkNotNull(!fields.isEmpty());
node.setType(TTypeNodeType.STRUCT);
- node.setStruct_fields(new ArrayList<TStructField>());
+ node.setStructFields(new ArrayList<TStructField>());
for (StructField field : fields) {
field.toThrift(container, node);
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/catalog/TabletInvertedIndex.java b/fe/fe-core/src/main/java/org/apache/doris/catalog/TabletInvertedIndex.java
index 74bfff4..cba4b40 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/catalog/TabletInvertedIndex.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/catalog/TabletInvertedIndex.java
@@ -120,8 +120,8 @@ public class TabletInvertedIndex {
for (TTablet backendTablet : backendTablets.values()) {
for (TTabletInfo tabletInfo : backendTablet.tablet_infos) {
- if (!tabletInfo.isSetPartition_id() || tabletInfo.getPartition_id() < 1) {
- tabletWithoutPartitionId.add(new Pair<>(tabletInfo.getTablet_id(), tabletInfo.getSchema_hash()));
+ if (!tabletInfo.isSetPartitionId() || tabletInfo.getPartitionId() < 1) {
+ tabletWithoutPartitionId.add(new Pair<>(tabletInfo.getTabletId(), tabletInfo.getSchemaHash()));
}
}
}
@@ -141,8 +141,8 @@ public class TabletInvertedIndex {
if (backendTablets.containsKey(tabletId)) {
TTablet backendTablet = backendTablets.get(tabletId);
Replica replica = entry.getValue();
- for (TTabletInfo backendTabletInfo : backendTablet.getTablet_infos()) {
- if (tabletMeta.containsSchemaHash(backendTabletInfo.getSchema_hash())) {
+ for (TTabletInfo backendTabletInfo : backendTablet.getTabletInfos()) {
+ if (tabletMeta.containsSchemaHash(backendTabletInfo.getSchemaHash())) {
foundTabletsWithValidSchema.add(tabletId);
// 1. (intersection)
if (needSync(replica, backendTabletInfo)) {
@@ -152,15 +152,15 @@ public class TabletInvertedIndex {
// check and set path
// path info of replica is only saved in Master FE
- if (backendTabletInfo.isSetPath_hash() &&
- replica.getPathHash() != backendTabletInfo.getPath_hash()) {
- replica.setPathHash(backendTabletInfo.getPath_hash());
+ if (backendTabletInfo.isSetPathHash() &&
+ replica.getPathHash() != backendTabletInfo.getPathHash()) {
+ replica.setPathHash(backendTabletInfo.getPathHash());
}
- if (backendTabletInfo.isSetSchema_hash() && replica.getState() == ReplicaState.NORMAL
- && replica.getSchemaHash() != backendTabletInfo.getSchema_hash()) {
+ if (backendTabletInfo.isSetSchemaHash() && replica.getState() == ReplicaState.NORMAL
+ && replica.getSchemaHash() != backendTabletInfo.getSchemaHash()) {
// update the schema hash only when replica is normal
- replica.setSchemaHash(backendTabletInfo.getSchema_hash());
+ replica.setSchemaHash(backendTabletInfo.getSchemaHash());
}
if (needRecover(replica, tabletMeta.getOldSchemaHash(), backendTabletInfo)) {
@@ -169,18 +169,18 @@ public class TabletInvertedIndex {
+ " is bad: {}, is version missing: {}",
replica.getId(), tabletId, backendId, replica,
backendTabletInfo.getVersion(),
- backendTabletInfo.getVersion_hash(),
- backendTabletInfo.getSchema_hash(),
+ backendTabletInfo.getVersionHash(),
+ backendTabletInfo.getSchemaHash(),
backendTabletInfo.isSetUsed() ? backendTabletInfo.isUsed() : "unknown",
- backendTabletInfo.isSetVersion_miss() ? backendTabletInfo.isVersion_miss() : "unset");
+ backendTabletInfo.isSetVersionMiss() ? backendTabletInfo.isVersionMiss() : "unset");
tabletRecoveryMap.put(tabletMeta.getDbId(), tabletId);
}
// check if need migration
long partitionId = tabletMeta.getPartitionId();
TStorageMedium storageMedium = storageMediumMap.get(partitionId);
- if (storageMedium != null && backendTabletInfo.isSetStorage_medium()) {
- if (storageMedium != backendTabletInfo.getStorage_medium()) {
+ if (storageMedium != null && backendTabletInfo.isSetStorageMedium()) {
+ if (storageMedium != backendTabletInfo.getStorageMedium()) {
tabletMigrationMap.put(storageMedium, tabletId);
}
if (storageMedium != tabletMeta.getStorageMedium()) {
@@ -188,8 +188,8 @@ public class TabletInvertedIndex {
}
}
// check if should clear transactions
- if (backendTabletInfo.isSetTransaction_ids()) {
- List<Long> transactionIds = backendTabletInfo.getTransaction_ids();
+ if (backendTabletInfo.isSetTransactionIds()) {
+ List<Long> transactionIds = backendTabletInfo.getTransactionIds();
GlobalTransactionMgr transactionMgr = Catalog.getCurrentGlobalTransactionMgr();
for (Long transactionId : transactionIds) {
TransactionState transactionState = transactionMgr.getTransactionState(tabletMeta.getDbId(), transactionId);
@@ -229,8 +229,8 @@ public class TabletInvertedIndex {
// update replicas's version count
// no need to write log, and no need to get db lock.
- if (backendTabletInfo.isSetVersion_count()) {
- replica.setVersionCount(backendTabletInfo.getVersion_count());
+ if (backendTabletInfo.isSetVersionCount()) {
+ replica.setVersionCount(backendTabletInfo.getVersionCount());
}
} else {
// tablet with invalid schemahash
@@ -306,7 +306,7 @@ public class TabletInvertedIndex {
if (backendTabletInfo.getVersion() > versionInFe) {
// backend replica's version is larger or newer than replica in FE, sync it.
return true;
- } else if (versionInFe == backendTabletInfo.getVersion() && versionHashInFe == backendTabletInfo.getVersion_hash()
+ } else if (versionInFe == backendTabletInfo.getVersion() && versionHashInFe == backendTabletInfo.getVersionHash()
&& replicaInFe.isBad()) {
// backend replica's version is equal to replica in FE, but replica in FE is bad, while backend replica is good, sync it
return true;
@@ -336,8 +336,8 @@ public class TabletInvertedIndex {
return true;
}
- if (schemaHashInFe != backendTabletInfo.getSchema_hash()
- || backendTabletInfo.getVersion() == -1 && backendTabletInfo.getVersion_hash() == 0) {
+ if (schemaHashInFe != backendTabletInfo.getSchemaHash()
+ || backendTabletInfo.getVersion() == -1 && backendTabletInfo.getVersionHash() == 0) {
// no data file exist on BE, maybe this is a newly created schema change tablet. no need to recovery
return false;
}
@@ -356,7 +356,7 @@ public class TabletInvertedIndex {
return false;
}
- if (backendTabletInfo.isSetVersion_miss() && backendTabletInfo.isVersion_miss()) {
+ if (backendTabletInfo.isSetVersionMiss() && backendTabletInfo.isVersionMiss()) {
// even if backend version is less than fe's version, but if version_miss is false,
// which means this may be a stale report.
// so we only return true if version_miss is true.
diff --git a/fe/fe-core/src/main/java/org/apache/doris/catalog/TabletStatMgr.java b/fe/fe-core/src/main/java/org/apache/doris/catalog/TabletStatMgr.java
index 0dcdc69..25501bd 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/catalog/TabletStatMgr.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/catalog/TabletStatMgr.java
@@ -59,9 +59,9 @@ public class TabletStatMgr extends MasterDaemon {
try {
address = new TNetworkAddress(backend.getHost(), backend.getBePort());
client = ClientPool.backendPool.borrowObject(address);
- TTabletStatResult result = client.get_tablet_stat();
+ TTabletStatResult result = client.getTabletStat();
- LOG.info("get tablet stat from backend: {}, num: {}", backend.getId(), result.getTablets_statsSize());
+ LOG.info("get tablet stat from backend: {}, num: {}", backend.getId(), result.getTabletsStatsSize());
updateTabletStat(backend.getId(), result);
ok = true;
@@ -126,7 +126,7 @@ public class TabletStatMgr extends MasterDaemon {
private void updateTabletStat(Long beId, TTabletStatResult result) {
TabletInvertedIndex invertedIndex = Catalog.getCurrentInvertedIndex();
- for (Map.Entry<Long, TTabletStat> entry : result.getTablets_stats().entrySet()) {
+ for (Map.Entry<Long, TTabletStat> entry : result.getTabletsStats().entrySet()) {
if (invertedIndex.getTabletMeta(entry.getKey()) == null) {
// the replica is obsolete, ignore it.
continue;
@@ -137,7 +137,7 @@ public class TabletStatMgr extends MasterDaemon {
continue;
}
// TODO(cmy) no db lock protected. I think it is ok even we get wrong row num
- replica.updateStat(entry.getValue().getData_size(), entry.getValue().getRow_num());
+ replica.updateStat(entry.getValue().getDataSize(), entry.getValue().getRowNum());
}
}
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/catalog/Type.java b/fe/fe-core/src/main/java/org/apache/doris/catalog/Type.java
index 6dcf51e..1b19bb3 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/catalog/Type.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/catalog/Type.java
@@ -518,8 +518,8 @@ public abstract class Type {
int tmpNodeIdx = nodeIdx;
switch (node.getType()) {
case SCALAR: {
- Preconditions.checkState(node.isSetScalar_type());
- TScalarType scalarType = node.getScalar_type();
+ Preconditions.checkState(node.isSetScalarType());
+ TScalarType scalarType = node.getScalarType();
if (scalarType.getType() == TPrimitiveType.CHAR) {
Preconditions.checkState(scalarType.isSetLen());
type = ScalarType.createCharType(scalarType.getLen());
@@ -561,11 +561,11 @@ public abstract class Type {
break;
}
case STRUCT: {
- Preconditions.checkState(tmpNodeIdx + node.getStruct_fieldsSize() < col.getTypesSize());
+ Preconditions.checkState(tmpNodeIdx + node.getStructFieldsSize() < col.getTypesSize());
ArrayList<StructField> structFields = Lists.newArrayList();
++tmpNodeIdx;
- for (int i = 0; i < node.getStruct_fieldsSize(); ++i) {
- TStructField thriftField = node.getStruct_fields().get(i);
+ for (int i = 0; i < node.getStructFieldsSize(); ++i) {
+ TStructField thriftField = node.getStructFields().get(i);
String name = thriftField.getName();
String comment = null;
if (thriftField.isSetComment()) {
diff --git a/fe/fe-core/src/main/java/org/apache/doris/clone/TabletSchedCtx.java b/fe/fe-core/src/main/java/org/apache/doris/clone/TabletSchedCtx.java
index 0949cf6..723ef7c 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/clone/TabletSchedCtx.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/clone/TabletSchedCtx.java
@@ -751,11 +751,11 @@ public class TabletSchedCtx implements Comparable<TabletSchedCtx> {
setLastVisitedTime(System.currentTimeMillis());
// check if clone task success
- if (request.getTask_status().getStatus_code() != TStatusCode.OK) {
- throw new SchedException(Status.RUNNING_FAILED, request.getTask_status().getError_msgs().get(0));
+ if (request.getTaskStatus().getStatusCode() != TStatusCode.OK) {
+ throw new SchedException(Status.RUNNING_FAILED, request.getTaskStatus().getErrorMsgs().get(0));
}
- if (!request.isSetFinish_tablet_infos() || request.getFinish_tablet_infos().isEmpty()) {
+ if (!request.isSetFinishTabletInfos() || request.getFinishTabletInfos().isEmpty()) {
throw new SchedException(Status.RUNNING_FAILED, "tablet info is not set in task report request");
}
@@ -821,10 +821,10 @@ public class TabletSchedCtx implements Comparable<TabletSchedCtx> {
// But we will check if the clone replica's version is larger than or equal to the task's visible version.
// (which is 'visibleVersion[Hash]' saved)
// We should discard the clone replica with stale version.
- TTabletInfo reportedTablet = request.getFinish_tablet_infos().get(0);
+ TTabletInfo reportedTablet = request.getFinishTabletInfos().get(0);
if (reportedTablet.getVersion() < visibleVersion) {
String msg = String.format("the clone replica's version is stale. %d-%d, task visible version: %d-%d",
- reportedTablet.getVersion(), reportedTablet.getVersion_hash(),
+ reportedTablet.getVersion(), reportedTablet.getVersionHash(),
visibleVersion, visibleVersionHash);
throw new SchedException(Status.RUNNING_FAILED, msg);
}
@@ -836,10 +836,10 @@ public class TabletSchedCtx implements Comparable<TabletSchedCtx> {
"replica does not exist. backend id: " + destBackendId);
}
- replica.updateVersionInfo(reportedTablet.getVersion(), reportedTablet.getVersion_hash(),
- reportedTablet.getData_size(), reportedTablet.getRow_count());
- if (reportedTablet.isSetPath_hash()) {
- replica.setPathHash(reportedTablet.getPath_hash());
+ replica.updateVersionInfo(reportedTablet.getVersion(), reportedTablet.getVersionHash(),
+ reportedTablet.getDataSize(), reportedTablet.getRowCount());
+ if (reportedTablet.isSetPathHash()) {
+ replica.setPathHash(reportedTablet.getPathHash());
}
if (this.type == Type.BALANCE) {
@@ -856,10 +856,10 @@ public class TabletSchedCtx implements Comparable<TabletSchedCtx> {
ReplicaPersistInfo info = ReplicaPersistInfo.createForClone(dbId, tblId, partitionId, indexId,
tabletId, destBackendId, replica.getId(),
reportedTablet.getVersion(),
- reportedTablet.getVersion_hash(),
- reportedTablet.getSchema_hash(),
- reportedTablet.getData_size(),
- reportedTablet.getRow_count(),
+ reportedTablet.getVersionHash(),
+ reportedTablet.getSchemaHash(),
+ reportedTablet.getDataSize(),
+ reportedTablet.getRowCount(),
replica.getLastFailedVersion(),
replica.getLastFailedVersionHash(),
replica.getLastSuccessVersion(),
@@ -887,12 +887,12 @@ public class TabletSchedCtx implements Comparable<TabletSchedCtx> {
db.writeUnlock();
}
- if (request.isSetCopy_size()) {
- this.copySize = request.getCopy_size();
+ if (request.isSetCopySize()) {
+ this.copySize = request.getCopySize();
}
- if (request.isSetCopy_time_ms()) {
- this.copyTimeMs = request.getCopy_time_ms();
+ if (request.isSetCopyTimeMs()) {
+ this.copyTimeMs = request.getCopyTimeMs();
}
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/common/Status.java b/fe/fe-core/src/main/java/org/apache/doris/common/Status.java
index 93b655e..2fad775 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/common/Status.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/common/Status.java
@@ -53,7 +53,7 @@ public class Status {
public Status(final TStatus status) {
this.errorCode = status.status_code;
- if (status.isSetError_msgs()) {
+ if (status.isSetErrorMsgs()) {
this.errorMsg = status.error_msgs.get(0);
}
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/common/publish/ClusterStatePublisher.java b/fe/fe-core/src/main/java/org/apache/doris/common/publish/ClusterStatePublisher.java
index 3a7cae7..f3d6567 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/common/publish/ClusterStatePublisher.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/common/publish/ClusterStatePublisher.java
@@ -104,19 +104,19 @@ public class ClusterStatePublisher {
TAgentPublishRequest request = stateUpdate.toThrift();
TAgentResult tAgentResult = null;
try {
- tAgentResult = client.publish_cluster_state(request);
+ tAgentResult = client.publishClusterState(request);
} catch (TException e) {
// Ok, lets try another time
if (!ClientPool.backendPool.reopen(client)) {
// Failed another time, throw this
throw e;
}
- tAgentResult = client.publish_cluster_state(request);
+ tAgentResult = client.publishClusterState(request);
}
- if (tAgentResult.getStatus().getStatus_code() != TStatusCode.OK) {
+ if (tAgentResult.getStatus().getStatusCode() != TStatusCode.OK) {
// Success execute, no dirty data possibility
LOG.warn("Backend execute publish failed. backend=[{}], message=[{}]",
- addr, tAgentResult.getStatus().getError_msgs());
+ addr, tAgentResult.getStatus().getErrorMsgs());
}
LOG.debug("Success publish to backend([{}])", addr);
// Publish here
diff --git a/fe/fe-core/src/main/java/org/apache/doris/common/publish/ClusterStateUpdate.java b/fe/fe-core/src/main/java/org/apache/doris/common/publish/ClusterStateUpdate.java
index 3755c31..70d3cf4 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/common/publish/ClusterStateUpdate.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/common/publish/ClusterStateUpdate.java
@@ -35,7 +35,7 @@ public class ClusterStateUpdate {
public TAgentPublishRequest toThrift() {
TAgentPublishRequest request = new TAgentPublishRequest();
- request.setProtocol_version(TAgentServiceVersion.V1);
+ request.setProtocolVersion(TAgentServiceVersion.V1);
for (TopicUpdate update : updates) {
request.addToUpdates(update.toThrift());
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/load/DppScheduler.java b/fe/fe-core/src/main/java/org/apache/doris/load/DppScheduler.java
index 531486e..d9042d0 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/load/DppScheduler.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/load/DppScheduler.java
@@ -108,9 +108,9 @@ public class DppScheduler {
String dbName, Map<String, Object> jobConf, int retry) {
String etlJobId = null;
TStatus status = new TStatus();
- status.setStatus_code(TStatusCode.OK);
+ status.setStatusCode(TStatusCode.OK);
List<String> failMsgs = Lists.newArrayList();
- status.setError_msgs(failMsgs);
+ status.setErrorMsgs(failMsgs);
// check dpp lock map
if (retry > 0) {
@@ -123,7 +123,7 @@ public class DppScheduler {
try {
prepareDppApplications();
} catch (LoadException e) {
- status.setStatus_code(TStatusCode.CANCELLED);
+ status.setStatusCode(TStatusCode.CANCELLED);
failMsgs.add(e.getMessage());
return new EtlSubmitResult(status, null);
}
@@ -136,14 +136,14 @@ public class DppScheduler {
if (!Util.deleteDirectory(configDir)) {
String errMsg = "delete config dir error. job: " + jobId;
LOG.warn(errMsg + ", path: {}", configDirPath);
- status.setStatus_code(TStatusCode.CANCELLED);
+ status.setStatusCode(TStatusCode.CANCELLED);
failMsgs.add(errMsg);
return new EtlSubmitResult(status, null);
}
if (!configDir.mkdirs()) {
String errMsg = "create config file dir error. job: " + jobId;
LOG.warn(errMsg + ", path: {}", configDirPath);
- status.setStatus_code(TStatusCode.CANCELLED);
+ status.setStatusCode(TStatusCode.CANCELLED);
failMsgs.add(errMsg);
return new EtlSubmitResult(status, null);
}
@@ -159,7 +159,7 @@ public class DppScheduler {
String errMsg = "create config file error. job: " + jobId;
LOG.warn(errMsg + ", file: {}", configDirPath + "/" + JOB_CONFIG_FILE);
- status.setStatus_code(TStatusCode.CANCELLED);
+ status.setStatusCode(TStatusCode.CANCELLED);
failMsgs.add(errMsg);
return new EtlSubmitResult(status, null);
} finally {
@@ -168,7 +168,7 @@ public class DppScheduler {
bw.close();
} catch (IOException e) {
LOG.warn("close buffered writer error", e);
- status.setStatus_code(TStatusCode.CANCELLED);
+ status.setStatusCode(TStatusCode.CANCELLED);
failMsgs.add(e.getMessage());
return new EtlSubmitResult(status, null);
}
@@ -184,7 +184,7 @@ public class DppScheduler {
try {
reduceNumByInputSize = calcReduceNumByInputSize(inputPaths);
} catch (InputSizeInvalidException e) {
- status.setStatus_code(TStatusCode.CANCELLED);
+ status.setStatusCode(TStatusCode.CANCELLED);
failMsgs.add(e.getMessage());
return new EtlSubmitResult(status, null);
}
@@ -233,7 +233,7 @@ public class DppScheduler {
}
} catch (IOException e) {
LOG.warn("submit etl job error", e);
- status.setStatus_code(TStatusCode.CANCELLED);
+ status.setStatusCode(TStatusCode.CANCELLED);
failMsgs.add(e.getMessage());
return new EtlSubmitResult(status, null);
} finally {
@@ -245,7 +245,7 @@ public class DppScheduler {
errorReader.close();
} catch (IOException e) {
LOG.warn("close buffered reader error", e);
- status.setStatus_code(TStatusCode.CANCELLED);
+ status.setStatusCode(TStatusCode.CANCELLED);
failMsgs.add(e.getMessage());
return new EtlSubmitResult(status, null);
}
@@ -253,7 +253,7 @@ public class DppScheduler {
}
if (etlJobId == null) {
- status.setStatus_code(TStatusCode.CANCELLED);
+ status.setStatusCode(TStatusCode.CANCELLED);
}
return new EtlSubmitResult(status, etlJobId);
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/load/ExportJob.java b/fe/fe-core/src/main/java/org/apache/doris/load/ExportJob.java
index 6589f62..b677d38 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/load/ExportJob.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/load/ExportJob.java
@@ -549,7 +549,7 @@ public class ExportJob implements Writable {
AgentClient client = new AgentClient(host, port);
TAgentResult result = client.releaseSnapshot(snapshotPath.second);
- if (result == null || result.getStatus().getStatus_code() != TStatusCode.OK) {
+ if (result == null || result.getStatus().getStatusCode() != TStatusCode.OK) {
continue;
}
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/load/Load.java b/fe/fe-core/src/main/java/org/apache/doris/load/Load.java
index ee9176a..bbc549a 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/load/Load.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/load/Load.java
@@ -1051,7 +1051,7 @@ public class Load {
// which is not nullable.
slotDesc.setIsNullable(true);
slotDesc.setColumn(new Column(realColName, PrimitiveType.VARCHAR));
- params.addToSrc_slot_ids(slotDesc.getId().asInt());
+ params.addToSrcSlotIds(slotDesc.getId().asInt());
slotDescByName.put(realColName, slotDesc);
}
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/load/LoadErrorHub.java b/fe/fe-core/src/main/java/org/apache/doris/load/LoadErrorHub.java
index b64231b..5db3d2f 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/load/LoadErrorHub.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/load/LoadErrorHub.java
@@ -131,11 +131,11 @@ public abstract class LoadErrorHub {
switch (type) {
case MYSQL_TYPE:
info.setType(TErrorHubType.MYSQL);
- info.setMysql_info(mysqlParam.toThrift());
+ info.setMysqlInfo(mysqlParam.toThrift());
break;
case BROKER_TYPE:
info.setType(TErrorHubType.BROKER);
- info.setBroker_info(brokerParam.toThrift());
+ info.setBrokerInfo(brokerParam.toThrift());
break;
case NULL_TYPE:
info.setType(TErrorHubType.NULL_TYPE);
diff --git a/fe/fe-core/src/main/java/org/apache/doris/load/loadv2/MiniLoadJob.java b/fe/fe-core/src/main/java/org/apache/doris/load/loadv2/MiniLoadJob.java
index a997b12..a77da09 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/load/loadv2/MiniLoadJob.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/load/loadv2/MiniLoadJob.java
@@ -63,18 +63,18 @@ public class MiniLoadJob extends LoadJob {
this.tableId = tableId;
this.jobType = EtlJobType.MINI;
this.tableName = request.getTbl();
- if (request.isSetTimeout_second()) {
- this.timeoutSecond = request.getTimeout_second();
+ if (request.isSetTimeoutSecond()) {
+ this.timeoutSecond = request.getTimeoutSecond();
} else {
this.timeoutSecond = Config.stream_load_default_timeout_second;
}
- if (request.isSetMax_filter_ratio()) {
- this.maxFilterRatio = request.getMax_filter_ratio();
+ if (request.isSetMaxFilterRatio()) {
+ this.maxFilterRatio = request.getMaxFilterRatio();
}
- this.createTimestamp = request.getCreate_timestamp();
+ this.createTimestamp = request.getCreateTimestamp();
this.loadStartTimestamp = createTimestamp;
this.authorizationInfo = gatherAuthInfo();
- this.requestId = request.getRequest_id();
+ this.requestId = request.getRequestId();
}
@Override
diff --git a/fe/fe-core/src/main/java/org/apache/doris/load/loadv2/SparkLoadJob.java b/fe/fe-core/src/main/java/org/apache/doris/load/loadv2/SparkLoadJob.java
index d18416d..2cb28a2 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/load/loadv2/SparkLoadJob.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/load/loadv2/SparkLoadJob.java
@@ -468,11 +468,11 @@ public class SparkLoadJob extends BulkLoadJob {
// update filePath fileSize
TBrokerRangeDesc tBrokerRangeDesc = tBrokerScanRange.getRanges().get(0);
tBrokerRangeDesc.setPath("");
- tBrokerRangeDesc.setFile_size(-1);
+ tBrokerRangeDesc.setFileSize(-1);
if (tabletMetaToFileInfo.containsKey(tabletMetaStr)) {
Pair<String, Long> fileInfo = tabletMetaToFileInfo.get(tabletMetaStr);
tBrokerRangeDesc.setPath(fileInfo.first);
- tBrokerRangeDesc.setFile_size(fileInfo.second);
+ tBrokerRangeDesc.setFileSize(fileInfo.second);
}
// update broker address
@@ -480,7 +480,7 @@ public class SparkLoadJob extends BulkLoadJob {
.getBackend(backendId);
FsBroker fsBroker = Catalog.getCurrentCatalog().getBrokerMgr().getBroker(
brokerDesc.getName(), backend.getHost());
- tBrokerScanRange.getBroker_addresses().add(
+ tBrokerScanRange.getBrokerAddresses().add(
new TNetworkAddress(fsBroker.ip, fsBroker.port));
LOG.debug("push task for replica {}, broker {}:{}, backendId {}, filePath {}, fileSize {}" ,
@@ -855,7 +855,7 @@ public class SparkLoadJob extends BulkLoadJob {
List<Column> columns, BrokerDesc brokerDesc) throws AnalysisException {
// scan range params
TBrokerScanRangeParams params = new TBrokerScanRangeParams();
- params.setStrict_mode(false);
+ params.setStrictMode(false);
params.setProperties(brokerDesc.getProperties());
TupleDescriptor srcTupleDesc = descTable.createTupleDescriptor();
Map<String, SlotDescriptor> srcSlotDescByName = Maps.newHashMap();
@@ -865,7 +865,7 @@ public class SparkLoadJob extends BulkLoadJob {
srcSlotDesc.setIsMaterialized(true);
srcSlotDesc.setIsNullable(true);
srcSlotDesc.setColumn(new Column(column.getName(), PrimitiveType.VARCHAR));
- params.addToSrc_slot_ids(srcSlotDesc.getId().asInt());
+ params.addToSrcSlotIds(srcSlotDesc.getId().asInt());
srcSlotDescByName.put(column.getName(), srcSlotDesc);
}
@@ -879,22 +879,22 @@ public class SparkLoadJob extends BulkLoadJob {
destSidToSrcSidWithoutTrans.put(destSlotDesc.getId().asInt(), srcSlotDesc.getId().asInt());
Expr expr = new SlotRef(srcSlotDesc);
expr = castToSlot(destSlotDesc, expr);
- params.putToExpr_of_dest_slot(destSlotDesc.getId().asInt(), expr.treeToThrift());
+ params.putToExprOfDestSlot(destSlotDesc.getId().asInt(), expr.treeToThrift());
}
- params.setDest_sid_to_src_sid_without_trans(destSidToSrcSidWithoutTrans);
- params.setSrc_tuple_id(srcTupleDesc.getId().asInt());
- params.setDest_tuple_id(destTupleDesc.getId().asInt());
+ params.setDestSidToSrcSidWithoutTrans(destSidToSrcSidWithoutTrans);
+ params.setSrcTupleId(srcTupleDesc.getId().asInt());
+ params.setDestTupleId(destTupleDesc.getId().asInt());
tBrokerScanRange.setParams(params);
// broker address updated for each replica
- tBrokerScanRange.setBroker_addresses(Lists.newArrayList());
+ tBrokerScanRange.setBrokerAddresses(Lists.newArrayList());
// broker range desc
TBrokerRangeDesc tBrokerRangeDesc = new TBrokerRangeDesc();
- tBrokerRangeDesc.setFile_type(TFileType.FILE_BROKER);
- tBrokerRangeDesc.setFormat_type(TFileFormatType.FORMAT_PARQUET);
+ tBrokerRangeDesc.setFileType(TFileType.FILE_BROKER);
+ tBrokerRangeDesc.setFormatType(TFileFormatType.FORMAT_PARQUET);
tBrokerRangeDesc.setSplittable(false);
- tBrokerRangeDesc.setStart_offset(0);
+ tBrokerRangeDesc.setStartOffset(0);
tBrokerRangeDesc.setSize(-1);
// path and file size updated for each replica
tBrokerScanRange.setRanges(Lists.newArrayList(tBrokerRangeDesc));
diff --git a/fe/fe-core/src/main/java/org/apache/doris/load/routineload/KafkaTaskInfo.java b/fe/fe-core/src/main/java/org/apache/doris/load/routineload/KafkaTaskInfo.java
index 145e9a7..07854b7 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/load/routineload/KafkaTaskInfo.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/load/routineload/KafkaTaskInfo.java
@@ -69,8 +69,8 @@ public class KafkaTaskInfo extends RoutineLoadTaskInfo {
TRoutineLoadTask tRoutineLoadTask = new TRoutineLoadTask();
TUniqueId queryId = new TUniqueId(id.getMostSignificantBits(), id.getLeastSignificantBits());
tRoutineLoadTask.setId(queryId);
- tRoutineLoadTask.setJob_id(jobId);
- tRoutineLoadTask.setTxn_id(txnId);
+ tRoutineLoadTask.setJobId(jobId);
+ tRoutineLoadTask.setTxnId(txnId);
Database database = Catalog.getCurrentCatalog().getDb(routineLoadJob.getDbId());
if (database == null) {
throw new MetaNotFoundException("database " + routineLoadJob.getDbId() + " does not exist");
@@ -84,18 +84,18 @@ public class KafkaTaskInfo extends RoutineLoadTaskInfo {
// label = job_name+job_id+task_id+txn_id
String label = Joiner.on("-").join(routineLoadJob.getName(), routineLoadJob.getId(), DebugUtil.printId(id), txnId);
tRoutineLoadTask.setLabel(label);
- tRoutineLoadTask.setAuth_code(routineLoadJob.getAuthCode());
+ tRoutineLoadTask.setAuthCode(routineLoadJob.getAuthCode());
TKafkaLoadInfo tKafkaLoadInfo = new TKafkaLoadInfo();
tKafkaLoadInfo.setTopic((routineLoadJob).getTopic());
tKafkaLoadInfo.setBrokers((routineLoadJob).getBrokerList());
- tKafkaLoadInfo.setPartition_begin_offset(partitionIdToOffset);
+ tKafkaLoadInfo.setPartitionBeginOffset(partitionIdToOffset);
tKafkaLoadInfo.setProperties(routineLoadJob.getConvertedCustomProperties());
- tRoutineLoadTask.setKafka_load_info(tKafkaLoadInfo);
+ tRoutineLoadTask.setKafkaLoadInfo(tKafkaLoadInfo);
tRoutineLoadTask.setType(TLoadSourceType.KAFKA);
tRoutineLoadTask.setParams(rePlan(routineLoadJob));
- tRoutineLoadTask.setMax_interval_s(routineLoadJob.getMaxBatchIntervalS());
- tRoutineLoadTask.setMax_batch_rows(routineLoadJob.getMaxBatchRows());
- tRoutineLoadTask.setMax_batch_size(routineLoadJob.getMaxBatchSizeBytes());
+ tRoutineLoadTask.setMaxIntervalS(routineLoadJob.getMaxBatchIntervalS());
+ tRoutineLoadTask.setMaxBatchRows(routineLoadJob.getMaxBatchRows());
+ tRoutineLoadTask.setMaxBatchSize(routineLoadJob.getMaxBatchSizeBytes());
if (!routineLoadJob.getFormat().isEmpty() && routineLoadJob.getFormat().equalsIgnoreCase("json")) {
tRoutineLoadTask.setFormat(TFileFormatType.FORMAT_JSON);
} else {
@@ -115,7 +115,7 @@ public class KafkaTaskInfo extends RoutineLoadTaskInfo {
// plan for each task, in case table has change(rollup or schema change)
TExecPlanFragmentParams tExecPlanFragmentParams = routineLoadJob.plan(loadId, txnId);
TPlanFragment tPlanFragment = tExecPlanFragmentParams.getFragment();
- tPlanFragment.getOutput_sink().getOlap_table_sink().setTxn_id(txnId);
+ tPlanFragment.getOutputSink().getOlapTableSink().setTxnId(txnId);
return tExecPlanFragmentParams;
}
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/load/routineload/RoutineLoadTaskScheduler.java b/fe/fe-core/src/main/java/org/apache/doris/load/routineload/RoutineLoadTaskScheduler.java
index 43c319b..3a377fa 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/load/routineload/RoutineLoadTaskScheduler.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/load/routineload/RoutineLoadTaskScheduler.java
@@ -247,12 +247,12 @@ public class RoutineLoadTaskScheduler extends MasterDaemon {
BackendService.Client client = null;
try {
client = ClientPool.backendPool.borrowObject(address);
- TStatus tStatus = client.submit_routine_load_task(Lists.newArrayList(tTask));
+ TStatus tStatus = client.submitRoutineLoadTask(Lists.newArrayList(tTask));
ok = true;
- if (tStatus.getStatus_code() != TStatusCode.OK) {
- throw new LoadException("failed to submit task. error code: " + tStatus.getStatus_code()
- + ", msg: " + (tStatus.getError_msgsSize() > 0 ? tStatus.getError_msgs().get(0) : "NaN"));
+ if (tStatus.getStatusCode() != TStatusCode.OK) {
+ throw new LoadException("failed to submit task. error code: " + tStatus.getStatusCode()
+ + ", msg: " + (tStatus.getErrorMsgsSize() > 0 ? tStatus.getErrorMsgs().get(0) : "NaN"));
}
LOG.debug("send routine load task {} to BE: {}", DebugUtil.printId(tTask.id), beId);
} catch (Exception e) {
diff --git a/fe/fe-core/src/main/java/org/apache/doris/master/MasterImpl.java b/fe/fe-core/src/main/java/org/apache/doris/master/MasterImpl.java
index e01232f..d78b1e9 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/master/MasterImpl.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/master/MasterImpl.java
@@ -94,28 +94,28 @@ public class MasterImpl {
result.setStatus(tStatus);
// check task status
// retry task by report process
- TStatus taskStatus = request.getTask_status();
+ TStatus taskStatus = request.getTaskStatus();
LOG.debug("get task report: {}", request.toString());
- if (taskStatus.getStatus_code() != TStatusCode.OK) {
+ if (taskStatus.getStatusCode() != TStatusCode.OK) {
LOG.warn("finish task reports bad. request: {}", request.toString());
}
// get backend
TBackend tBackend = request.getBackend();
String host = tBackend.getHost();
- int bePort = tBackend.getBe_port();
+ int bePort = tBackend.getBePort();
Backend backend = Catalog.getCurrentSystemInfo().getBackendWithBePort(host, bePort);
if (backend == null) {
- tStatus.setStatus_code(TStatusCode.CANCELLED);
+ tStatus.setStatusCode(TStatusCode.CANCELLED);
List<String> errorMsgs = new ArrayList<>();
errorMsgs.add("backend not exist.");
- tStatus.setError_msgs(errorMsgs);
+ tStatus.setErrorMsgs(errorMsgs);
LOG.warn("backend does not found. host: {}, be port: {}. task: {}", host, bePort, request.toString());
return result;
}
long backendId = backend.getId();
- TTaskType taskType = request.getTask_type();
+ TTaskType taskType = request.getTaskType();
long signature = request.getSignature();
AgentTask task = AgentTaskQueue.getTask(backendId, taskType, signature);
@@ -125,17 +125,17 @@ public class MasterImpl {
String errMsg = "cannot find task. type: " + taskType + ", backendId: " + backendId
+ ", signature: " + signature;
LOG.warn(errMsg);
- tStatus.setStatus_code(TStatusCode.CANCELLED);
+ tStatus.setStatusCode(TStatusCode.CANCELLED);
List<String> errorMsgs = new ArrayList<String>();
errorMsgs.add(errMsg);
- tStatus.setError_msgs(errorMsgs);
+ tStatus.setErrorMsgs(errorMsgs);
}
return result;
} else {
- if (taskStatus.getStatus_code() != TStatusCode.OK) {
+ if (taskStatus.getStatusCode() != TStatusCode.OK) {
task.failed();
- String errMsg = "task type: " + taskType + ", status_code: " + taskStatus.getStatus_code().toString() +
- (taskStatus.isSetError_msgs() ? (", status_message: " + taskStatus.getError_msgs()) : "") +
+ String errMsg = "task type: " + taskType + ", status_code: " + taskStatus.getStatusCode().toString() +
+ (taskStatus.isSetErrorMsgs() ? (", status_message: " + taskStatus.getErrorMsgs()) : "") +
", backendId: " + backend + ", signature: " + signature;
task.setErrorMsg(errMsg);
// We start to let FE perceive the task's error msg
@@ -152,17 +152,17 @@ public class MasterImpl {
List<TTabletInfo> finishTabletInfos;
switch (taskType) {
case CREATE:
- Preconditions.checkState(request.isSetReport_version());
+ Preconditions.checkState(request.isSetReportVersion());
finishCreateReplica(task, request);
break;
case PUSH:
checkHasTabletInfo(request);
- Preconditions.checkState(request.isSetReport_version());
+ Preconditions.checkState(request.isSetReportVersion());
finishPush(task, request);
break;
case REALTIME_PUSH:
checkHasTabletInfo(request);
- Preconditions.checkState(request.isSetReport_version());
+ Preconditions.checkState(request.isSetReportVersion());
finishRealtimePush(task, request);
break;
case PUBLISH_VERSION:
@@ -175,14 +175,14 @@ public class MasterImpl {
finishDropReplica(task);
break;
case SCHEMA_CHANGE:
- Preconditions.checkState(request.isSetReport_version());
+ Preconditions.checkState(request.isSetReportVersion());
checkHasTabletInfo(request);
- finishTabletInfos = request.getFinish_tablet_infos();
- finishSchemaChange(task, finishTabletInfos, request.getReport_version());
+ finishTabletInfos = request.getFinishTabletInfos();
+ finishSchemaChange(task, finishTabletInfos, request.getReportVersion());
break;
case ROLLUP:
checkHasTabletInfo(request);
- finishTabletInfos = request.getFinish_tablet_infos();
+ finishTabletInfos = request.getFinishTabletInfos();
finishRollup(task, finishTabletInfos);
break;
case CLONE:
@@ -216,15 +216,15 @@ public class MasterImpl {
break;
}
} catch (Exception e) {
- tStatus.setStatus_code(TStatusCode.CANCELLED);
+ tStatus.setStatusCode(TStatusCode.CANCELLED);
String errMsg = "finish agent task error.";
LOG.warn(errMsg, e);
List<String> errorMsgs = new ArrayList<String>();
errorMsgs.add(errMsg);
- tStatus.setError_msgs(errorMsgs);
+ tStatus.setErrorMsgs(errorMsgs);
}
- if (tStatus.getStatus_code() == TStatusCode.OK) {
+ if (tStatus.getStatusCode() == TStatusCode.OK) {
LOG.debug("report task success. {}", request.toString());
}
@@ -232,7 +232,7 @@ public class MasterImpl {
}
private void checkHasTabletInfo(TFinishTaskRequest request) throws Exception {
- if (!request.isSetFinish_tablet_infos() || request.getFinish_tablet_infos().isEmpty()) {
+ if (!request.isSetFinishTabletInfos() || request.getFinishTabletInfos().isEmpty()) {
throw new Exception("tablet info is not set");
}
}
@@ -243,15 +243,15 @@ public class MasterImpl {
// and if meta is missing, we no longer need to resend this task
try {
CreateReplicaTask createReplicaTask = (CreateReplicaTask) task;
- if (request.getTask_status().getStatus_code() != TStatusCode.OK) {
- createReplicaTask.countDownToZero(task.getBackendId() + ": " + request.getTask_status().getError_msgs().toString());
+ if (request.getTaskStatus().getStatusCode() != TStatusCode.OK) {
+ createReplicaTask.countDownToZero(task.getBackendId() + ": " + request.getTaskStatus().getErrorMsgs().toString());
} else {
long tabletId = createReplicaTask.getTabletId();
- if (request.isSetFinish_tablet_infos()) {
+ if (request.isSetFinishTabletInfos()) {
Replica replica = Catalog.getCurrentInvertedIndex().getReplica(createReplicaTask.getTabletId(),
createReplicaTask.getBackendId());
- replica.setPathHash(request.getFinish_tablet_infos().get(0).getPath_hash());
+ replica.setPathHash(request.getFinishTabletInfos().get(0).getPathHash());
if (createReplicaTask.isRecoverTask()) {
/**
@@ -265,11 +265,11 @@ public class MasterImpl {
}
// this should be called before 'countDownLatch()'
- Catalog.getCurrentSystemInfo().updateBackendReportVersion(task.getBackendId(), request.getReport_version(), task.getDbId());
+ Catalog.getCurrentSystemInfo().updateBackendReportVersion(task.getBackendId(), request.getReportVersion(), task.getDbId());
createReplicaTask.countDownLatch(task.getBackendId(), task.getSignature());
LOG.debug("finish create replica. tablet id: {}, be: {}, report version: {}",
- tabletId, task.getBackendId(), request.getReport_version());
+ tabletId, task.getBackendId(), request.getReportVersion());
}
} finally {
AgentTaskQueue.removeTask(task.getBackendId(), TTaskType.CREATE, task.getSignature());
@@ -282,8 +282,8 @@ public class MasterImpl {
// and if meta is missing, we no longer need to resend this task
try {
UpdateTabletMetaInfoTask tabletTask = (UpdateTabletMetaInfoTask) task;
- if (request.getTask_status().getStatus_code() != TStatusCode.OK) {
- tabletTask.countDownToZero(task.getBackendId() + ": " + request.getTask_status().getError_msgs().toString());
+ if (request.getTaskStatus().getStatusCode() != TStatusCode.OK) {
+ tabletTask.countDownToZero(task.getBackendId() + ": " + request.getTaskStatus().getErrorMsgs().toString());
} else {
tabletTask.countDownLatch(task.getBackendId(), tabletTask.getTablets());
LOG.debug("finish update tablet meta. tablet id: {}, be: {}", tabletTask.getTablets(), task.getBackendId());
@@ -294,7 +294,7 @@ public class MasterImpl {
}
private void finishRealtimePush(AgentTask task, TFinishTaskRequest request) {
- List<TTabletInfo> finishTabletInfos = request.getFinish_tablet_infos();
+ List<TTabletInfo> finishTabletInfos = request.getFinishTabletInfos();
Preconditions.checkState(finishTabletInfos != null && !finishTabletInfos.isEmpty());
PushTask pushTask = (PushTask) task;
@@ -324,7 +324,7 @@ public class MasterImpl {
if (finishTabletInfos.size() == 1) {
pushState = PartitionState.NORMAL;
} else if (finishTabletInfos.size() == 2) {
- if (finishTabletInfos.get(0).getTablet_id() == finishTabletInfos.get(1).getTablet_id()) {
+ if (finishTabletInfos.get(0).getTabletId() == finishTabletInfos.get(1).getTabletId()) {
pushState = PartitionState.SCHEMA_CHANGE;
} else {
pushState = PartitionState.ROLLUP;
@@ -355,12 +355,12 @@ public class MasterImpl {
}
// should be done before addReplicaPersistInfos and countDownLatch
- long reportVersion = request.getReport_version();
+ long reportVersion = request.getReportVersion();
Catalog.getCurrentSystemInfo().updateBackendReportVersion(task.getBackendId(), reportVersion,
task.getDbId());
List<Long> tabletIds = finishTabletInfos.stream().map(
- tTabletInfo -> tTabletInfo.getTablet_id()).collect(Collectors.toList());
+ tTabletInfo -> tTabletInfo.getTabletId()).collect(Collectors.toList());
List<TabletMeta> tabletMetaList = Catalog.getCurrentInvertedIndex().getTabletMetaList(tabletIds);
// handle load job
@@ -427,8 +427,8 @@ public class MasterImpl {
private void checkReplica(TTabletInfo tTabletInfo, TabletMeta tabletMeta)
throws MetaNotFoundException {
- long tabletId = tTabletInfo.getTablet_id();
- int schemaHash = tTabletInfo.getSchema_hash();
+ long tabletId = tTabletInfo.getTabletId();
+ int schemaHash = tTabletInfo.getSchemaHash();
// during finishing stage, index's schema hash switched, when old schema hash finished
// current index hash != old schema hash and alter job's new schema hash != old schema hash
// the check replica will failed
@@ -493,7 +493,7 @@ public class MasterImpl {
}
private void finishPush(AgentTask task, TFinishTaskRequest request) {
- List<TTabletInfo> finishTabletInfos = request.getFinish_tablet_infos();
+ List<TTabletInfo> finishTabletInfos = request.getFinishTabletInfos();
Preconditions.checkState(finishTabletInfos != null && !finishTabletInfos.isEmpty());
PushTask pushTask = (PushTask) task;
@@ -501,7 +501,7 @@ public class MasterImpl {
// we might get new version push task, so check task version first
// all tablets in tablet infos should have same version and version hash
long finishVersion = finishTabletInfos.get(0).getVersion();
- long finishVersionHash = finishTabletInfos.get(0).getVersion_hash();
+ long finishVersionHash = finishTabletInfos.get(0).getVersionHash();
long taskVersion = pushTask.getVersion();
if (finishVersion != taskVersion) {
LOG.debug("finish tablet version is not consistent with task. "
@@ -536,7 +536,7 @@ public class MasterImpl {
if (finishTabletInfos.size() == 1) {
pushState = PartitionState.NORMAL;
} else if (finishTabletInfos.size() == 2) {
- if (finishTabletInfos.get(0).getTablet_id() == finishTabletInfos.get(1).getTablet_id()) {
+ if (finishTabletInfos.get(0).getTabletId() == finishTabletInfos.get(1).getTabletId()) {
pushState = PartitionState.SCHEMA_CHANGE;
} else {
pushState = PartitionState.ROLLUP;
@@ -563,7 +563,7 @@ public class MasterImpl {
// update replica version and versionHash
List<ReplicaPersistInfo> infos = new LinkedList<ReplicaPersistInfo>();
List<Long> tabletIds = finishTabletInfos.stream().map(
- finishTabletInfo -> finishTabletInfo.getTablet_id()).collect(Collectors.toList());
+ finishTabletInfo -> finishTabletInfo.getTabletId()).collect(Collectors.toList());
List<TabletMeta> tabletMetaList = Catalog.getCurrentInvertedIndex().getTabletMetaList(tabletIds);
for (int i = 0; i < tabletMetaList.size(); i++) {
TabletMeta tabletMeta = tabletMetaList.get(i);
@@ -578,7 +578,7 @@ public class MasterImpl {
}
// should be done before addReplicaPersistInfos and countDownLatch
- long reportVersion = request.getReport_version();
+ long reportVersion = request.getReportVersion();
Catalog.getCurrentSystemInfo().updateBackendReportVersion(task.getBackendId(), reportVersion,
task.getDbId());
@@ -596,9 +596,9 @@ public class MasterImpl {
}
} else if (pushTask.getPushType() == TPushType.DELETE) {
// report delete task must match version and version hash
- if (pushTask.getVersion() != request.getRequest_version()) {
+ if (pushTask.getVersion() != request.getRequestVersion()) {
throw new MetaNotFoundException("delete task is not match. [" + pushTask.getVersion() + "-"
- + request.getRequest_version() + "]");
+ + request.getRequestVersion() + "]");
}
if (pushTask.isSyncDelete()) {
@@ -638,13 +638,13 @@ public class MasterImpl {
private void finishPublishVersion(AgentTask task, TFinishTaskRequest request) {
List<Long> errorTabletIds = null;
- if (request.isSetError_tablet_ids()) {
- errorTabletIds = request.getError_tablet_ids();
+ if (request.isSetErrorTabletIds()) {
+ errorTabletIds = request.getErrorTabletIds();
}
- if (request.isSetReport_version()) {
+ if (request.isSetReportVersion()) {
// report version is required. here we check if set, for compatibility.
- long reportVersion = request.getReport_version();
+ long reportVersion = request.getReportVersion();
Catalog.getCurrentSystemInfo().updateBackendReportVersion(task.getBackendId(), reportVersion, task.getDbId());
}
@@ -652,7 +652,7 @@ public class MasterImpl {
publishVersionTask.addErrorTablets(errorTabletIds);
publishVersionTask.setIsFinished(true);
- if (request.getTask_status().getStatus_code() != TStatusCode.OK) {
+ if (request.getTaskStatus().getStatusCode() != TStatusCode.OK) {
// not remove the task from queue and be will retry
return;
}
@@ -665,12 +665,12 @@ public class MasterImpl {
long backendId, long pushIndexId, long indexId,
TTabletInfo tTabletInfo, PartitionState pushState)
throws MetaNotFoundException {
- long tabletId = tTabletInfo.getTablet_id();
- int schemaHash = tTabletInfo.getSchema_hash();
+ long tabletId = tTabletInfo.getTabletId();
+ int schemaHash = tTabletInfo.getSchemaHash();
long version = tTabletInfo.getVersion();
- long versionHash = tTabletInfo.getVersion_hash();
- long rowCount = tTabletInfo.getRow_count();
- long dataSize = tTabletInfo.getData_size();
+ long versionHash = tTabletInfo.getVersionHash();
+ long rowCount = tTabletInfo.getRowCount();
+ long dataSize = tTabletInfo.getDataSize();
if (indexId != pushIndexId) {
// this may be a rollup tablet
@@ -786,14 +786,14 @@ public class MasterImpl {
private void finishConsistenctCheck(AgentTask task, TFinishTaskRequest request) {
CheckConsistencyTask checkConsistencyTask = (CheckConsistencyTask) task;
- if (checkConsistencyTask.getVersion() != request.getRequest_version()) {
+ if (checkConsistencyTask.getVersion() != request.getRequestVersion()) {
LOG.warn("check consisteny task is not match. [{}-{}]",
- checkConsistencyTask.getVersion(), request.getRequest_version());
+ checkConsistencyTask.getVersion(), request.getRequestVersion());
return;
}
Catalog.getCurrentCatalog().getConsistencyChecker().handleFinishedConsistencyCheck(checkConsistencyTask,
- request.getTablet_checksum());
+ request.getTabletChecksum());
AgentTaskQueue.removeTask(task.getBackendId(), TTaskType.CHECK_CONSISTENCY, task.getSignature());
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/master/ReportHandler.java b/fe/fe-core/src/main/java/org/apache/doris/master/ReportHandler.java
index fdbf3ce..56b3a9a 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/master/ReportHandler.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/master/ReportHandler.java
@@ -116,13 +116,13 @@ public class ReportHandler extends Daemon {
// get backend
TBackend tBackend = request.getBackend();
String host = tBackend.getHost();
- int bePort = tBackend.getBe_port();
+ int bePort = tBackend.getBePort();
Backend backend = Catalog.getCurrentSystemInfo().getBackendWithBePort(host, bePort);
if (backend == null) {
- tStatus.setStatus_code(TStatusCode.INTERNAL_ERROR);
+ tStatus.setStatusCode(TStatusCode.INTERNAL_ERROR);
List<String> errorMsgs = Lists.newArrayList();
errorMsgs.add("backend[" + host + ":" + bePort + "] does not exist.");
- tStatus.setError_msgs(errorMsgs);
+ tStatus.setErrorMsgs(errorMsgs);
return result;
}
@@ -145,28 +145,28 @@ public class ReportHandler extends Daemon {
if (request.isSetTablets()) {
tablets = request.getTablets();
- reportVersion = request.getReport_version();
+ reportVersion = request.getReportVersion();
reportType += "tablet";
- } else if (request.isSetTablet_list()) {
+ } else if (request.isSetTabletList()) {
// the 'tablets' member will be deprecated in future.
- tablets = buildTabletMap(request.getTablet_list());
- reportVersion = request.getReport_version();
+ tablets = buildTabletMap(request.getTabletList());
+ reportVersion = request.getReportVersion();
reportType += "tablet";
}
- if (request.isSetTablet_max_compaction_score()) {
- backend.setTabletMaxCompactionScore(request.getTablet_max_compaction_score());
+ if (request.isSetTabletMaxCompactionScore()) {
+ backend.setTabletMaxCompactionScore(request.getTabletMaxCompactionScore());
}
ReportTask reportTask = new ReportTask(beId, tasks, disks, tablets, reportVersion);
try {
putToQueue(reportTask);
} catch (Exception e) {
- tStatus.setStatus_code(TStatusCode.INTERNAL_ERROR);
+ tStatus.setStatusCode(TStatusCode.INTERNAL_ERROR);
List<String> errorMsgs = Lists.newArrayList();
errorMsgs.add("failed to put report task to queue. queue size: " + reportQueue.size());
errorMsgs.add("err: " + e.getMessage());
- tStatus.setError_msgs(errorMsgs);
+ tStatus.setErrorMsgs(errorMsgs);
return result;
}
@@ -188,11 +188,11 @@ public class ReportHandler extends Daemon {
private Map<Long, TTablet> buildTabletMap(List<TTablet> tabletList) {
Map<Long, TTablet> tabletMap = Maps.newHashMap();
for (TTablet tTablet : tabletList) {
- if (tTablet.getTablet_infos().isEmpty()) {
+ if (tTablet.getTabletInfos().isEmpty()) {
continue;
}
- tabletMap.put(tTablet.getTablet_infos().get(0).getTablet_id(), tTablet);
+ tabletMap.put(tTablet.getTabletInfos().get(0).getTabletId(), tTablet);
}
return tabletMap;
}
@@ -438,12 +438,12 @@ public class ReportHandler extends Daemon {
long dataSize = -1L;
// schema change maybe successfully in fe, but not inform be, then be will report two schema hash
// just select the dest schema hash
- for (TTabletInfo tabletInfo : backendTablets.get(tabletId).getTablet_infos()) {
- if (tabletInfo.getSchema_hash() == schemaHash) {
+ for (TTabletInfo tabletInfo : backendTablets.get(tabletId).getTabletInfos()) {
+ if (tabletInfo.getSchemaHash() == schemaHash) {
backendVersion = tabletInfo.getVersion();
- backendVersionHash = tabletInfo.getVersion_hash();
- rowCount = tabletInfo.getRow_count();
- dataSize = tabletInfo.getData_size();
+ backendVersionHash = tabletInfo.getVersionHash();
+ rowCount = tabletInfo.getRowCount();
+ dataSize = tabletInfo.getDataSize();
break;
}
}
@@ -661,7 +661,7 @@ public class ReportHandler extends Daemon {
AgentBatchTask batchTask = new AgentBatchTask();
for (Long tabletId : backendTablets.keySet()) {
TTablet backendTablet = backendTablets.get(tabletId);
- for (TTabletInfo backendTabletInfo : backendTablet.getTablet_infos()) {
+ for (TTabletInfo backendTabletInfo : backendTablet.getTabletInfos()) {
boolean needDelete = false;
if (!foundTabletsWithValidSchema.contains(tabletId)) {
if (isBackendReplicaHealthy(backendTabletInfo)) {
@@ -684,9 +684,9 @@ public class ReportHandler extends Daemon {
if (needDelete) {
// drop replica
- DropReplicaTask task = new DropReplicaTask(backendId, tabletId, backendTabletInfo.getSchema_hash());
+ DropReplicaTask task = new DropReplicaTask(backendId, tabletId, backendTabletInfo.getSchemaHash());
batchTask.addTask(task);
- LOG.warn("delete tablet[" + tabletId + " - " + backendTabletInfo.getSchema_hash()
+ LOG.warn("delete tablet[" + tabletId + " - " + backendTabletInfo.getSchemaHash()
+ "] from backend[" + backendId + "] because not found in meta");
++deleteFromBackendCounter;
}
@@ -695,7 +695,7 @@ public class ReportHandler extends Daemon {
if (foundTabletsWithInvalidSchema.containsKey(tabletId)) {
// this tablet is found in meta but with invalid schema hash.
// delete it.
- int schemaHash = foundTabletsWithInvalidSchema.get(tabletId).getSchema_hash();
+ int schemaHash = foundTabletsWithInvalidSchema.get(tabletId).getSchemaHash();
DropReplicaTask task = new DropReplicaTask(backendId, tabletId, schemaHash);
batchTask.addTask(task);
LOG.warn("delete tablet[" + tabletId + " - " + schemaHash + "] from backend[" + backendId
@@ -714,7 +714,7 @@ public class ReportHandler extends Daemon {
if (backendTabletInfo.isSetUsed() && !backendTabletInfo.isUsed()) {
return false;
}
- if (backendTabletInfo.isSetVersion_miss() && backendTabletInfo.isVersion_miss()) {
+ if (backendTabletInfo.isSetVersionMiss() && backendTabletInfo.isVersionMiss()) {
return false;
}
return true;
@@ -815,8 +815,8 @@ public class ReportHandler extends Daemon {
continue;
}
- for (TTabletInfo tTabletInfo : backendTablets.get(tabletId).getTablet_infos()) {
- if (tTabletInfo.getSchema_hash() == schemaHash) {
+ for (TTabletInfo tTabletInfo : backendTablets.get(tabletId).getTabletInfos()) {
+ if (tTabletInfo.getSchemaHash() == schemaHash) {
if (tTabletInfo.isSetUsed() && !tTabletInfo.isUsed()) {
if (replica.setBad(true)) {
LOG.warn("set bad for replica {} of tablet {} on backend {}",
@@ -887,10 +887,10 @@ public class ReportHandler extends Daemon {
TabletInvertedIndex invertedIndex = Catalog.getCurrentInvertedIndex();
for (TTablet backendTablet : backendTablets.values()) {
for (TTabletInfo tabletInfo : backendTablet.tablet_infos) {
- if (!tabletInfo.isSetIs_in_memory()) {
+ if (!tabletInfo.isSetIsInMemory()) {
continue;
}
- long tabletId = tabletInfo.getTablet_id();
+ long tabletId = tabletInfo.getTabletId();
boolean beIsInMemory = tabletInfo.is_in_memory;
TabletMeta tabletMeta = invertedIndex.getTabletMeta(tabletId);
long dbId = tabletMeta != null ? tabletMeta.getDbId() : TabletInvertedIndex.NOT_EXIST_VALUE;
@@ -913,7 +913,7 @@ public class ReportHandler extends Daemon {
}
boolean feIsInMemory = olapTable.getPartitionInfo().getIsInMemory(partitionId);
if (beIsInMemory != feIsInMemory) {
- tabletToInMemory.add(new ImmutableTriple<>(tabletId, tabletInfo.schema_hash, feIsInMemory));
+ tabletToInMemory.add(new ImmutableTriple<>(tabletId, tabletInfo.getSchemaHash(), feIsInMemory));
}
} finally {
db.readUnlock();
@@ -953,11 +953,11 @@ public class ReportHandler extends Daemon {
long partitionId = tabletMeta != null ? tabletMeta.getPartitionId() : TabletInvertedIndex.NOT_EXIST_VALUE;
long indexId = tabletMeta != null ? tabletMeta.getIndexId() : TabletInvertedIndex.NOT_EXIST_VALUE;
- int schemaHash = backendTabletInfo.getSchema_hash();
+ int schemaHash = backendTabletInfo.getSchemaHash();
long version = backendTabletInfo.getVersion();
- long versionHash = backendTabletInfo.getVersion_hash();
- long dataSize = backendTabletInfo.getData_size();
- long rowCount = backendTabletInfo.getRow_count();
+ long versionHash = backendTabletInfo.getVersionHash();
+ long dataSize = backendTabletInfo.getDataSize();
+ long rowCount = backendTabletInfo.getRowCount();
Database db = Catalog.getCurrentCatalog().getDb(dbId);
if (db == null) {
diff --git a/fe/fe-core/src/main/java/org/apache/doris/planner/AggregationNode.java b/fe/fe-core/src/main/java/org/apache/doris/planner/AggregationNode.java
index 07a1e13..975f2b1 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/planner/AggregationNode.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/planner/AggregationNode.java
@@ -93,7 +93,7 @@ public class AggregationNode extends PlanNode {
* as a preaggregation
*/
public void setIsPreagg(PlannerContext ctx_) {
- useStreamingPreagg = ctx_.getQueryOptions().isSetDisable_stream_preaggregations()
+ useStreamingPreagg = ctx_.getQueryOptions().isSetDisableStreamPreaggregations()
&& !ctx_.getQueryOptions().disable_stream_preaggregations
&& aggInfo.getGroupingExprs().size() > 0;
}
@@ -241,10 +241,10 @@ public class AggregationNode extends PlanNode {
aggregateFunctions,
aggInfo.getIntermediateTupleId().asInt(),
aggInfo.getOutputTupleId().asInt(), needsFinalize);
- msg.agg_node.setUse_streaming_preaggregation(useStreamingPreagg);
+ msg.agg_node.setUseStreamingPreaggregation(useStreamingPreagg);
List<Expr> groupingExprs = aggInfo.getGroupingExprs();
if (groupingExprs != null) {
- msg.agg_node.setGrouping_exprs(Expr.treesToThrift(groupingExprs));
+ msg.agg_node.setGroupingExprs(Expr.treesToThrift(groupingExprs));
}
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/planner/AnalyticEvalNode.java b/fe/fe-core/src/main/java/org/apache/doris/planner/AnalyticEvalNode.java
index 4fb91e2..f34557e 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/planner/AnalyticEvalNode.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/planner/AnalyticEvalNode.java
@@ -170,12 +170,12 @@ public class AnalyticEvalNode extends PlanNode {
protected void toThrift(TPlanNode msg) {
msg.node_type = TPlanNodeType.ANALYTIC_EVAL_NODE;
msg.analytic_node = new TAnalyticNode();
- msg.analytic_node.setIntermediate_tuple_id(intermediateTupleDesc.getId().asInt());
- msg.analytic_node.setOutput_tuple_id(outputTupleDesc.getId().asInt());
- msg.analytic_node.setPartition_exprs(Expr.treesToThrift(substitutedPartitionExprs));
- msg.analytic_node.setOrder_by_exprs(
+ msg.analytic_node.setIntermediateTupleId(intermediateTupleDesc.getId().asInt());
+ msg.analytic_node.setOutputTupleId(outputTupleDesc.getId().asInt());
+ msg.analytic_node.setPartitionExprs(Expr.treesToThrift(substitutedPartitionExprs));
+ msg.analytic_node.setOrderByExprs(
Expr.treesToThrift(OrderByElement.getOrderByExprs(orderByElements)));
- msg.analytic_node.setAnalytic_functions(Expr.treesToThrift(analyticFnCalls));
+ msg.analytic_node.setAnalyticFunctions(Expr.treesToThrift(analyticFnCalls));
if (analyticWindow == null) {
if (!orderByElements.isEmpty()) {
@@ -187,15 +187,15 @@ public class AnalyticEvalNode extends PlanNode {
}
if (partitionByEq != null) {
- msg.analytic_node.setPartition_by_eq(partitionByEq.treeToThrift());
+ msg.analytic_node.setPartitionByEq(partitionByEq.treeToThrift());
}
if (orderByEq != null) {
- msg.analytic_node.setOrder_by_eq(orderByEq.treeToThrift());
+ msg.analytic_node.setOrderByEq(orderByEq.treeToThrift());
}
if (bufferedTupleDesc != null) {
- msg.analytic_node.setBuffered_tuple_id(bufferedTupleDesc.getId().asInt());
+ msg.analytic_node.setBufferedTupleId(bufferedTupleDesc.getId().asInt());
}
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/planner/AssertNumRowsNode.java b/fe/fe-core/src/main/java/org/apache/doris/planner/AssertNumRowsNode.java
index 97c1bc1..3df9397 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/planner/AssertNumRowsNode.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/planner/AssertNumRowsNode.java
@@ -58,8 +58,8 @@ public class AssertNumRowsNode extends PlanNode {
protected void toThrift(TPlanNode msg) {
msg.node_type = TPlanNodeType.ASSERT_NUM_ROWS_NODE;
msg.assert_num_rows_node = new TAssertNumRowsNode();
- msg.assert_num_rows_node.setDesired_num_rows(desiredNumOfRows);
- msg.assert_num_rows_node.setSubquery_string(subqueryString);
+ msg.assert_num_rows_node.setDesiredNumRows(desiredNumOfRows);
+ msg.assert_num_rows_node.setSubqueryString(subqueryString);
msg.assert_num_rows_node.setAssertion(assertion.toThrift());
}
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/planner/BrokerScanNode.java b/fe/fe-core/src/main/java/org/apache/doris/planner/BrokerScanNode.java
index 081f7c6..e408f96 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/planner/BrokerScanNode.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/planner/BrokerScanNode.java
@@ -190,9 +190,9 @@ public class BrokerScanNode extends LoadScanNode {
context.params = params;
BrokerFileGroup fileGroup = context.fileGroup;
- params.setColumn_separator(fileGroup.getValueSeparator().getBytes(Charset.forName("UTF-8"))[0]);
- params.setLine_delimiter(fileGroup.getLineDelimiter().getBytes(Charset.forName("UTF-8"))[0]);
- params.setStrict_mode(strictMode);
+ params.setColumnSeparator(fileGroup.getValueSeparator().getBytes(Charset.forName("UTF-8"))[0]);
+ params.setLineDelimiter(fileGroup.getLineDelimiter().getBytes(Charset.forName("UTF-8"))[0]);
+ params.setStrictMode(strictMode);
params.setProperties(brokerDesc.getProperties());
initColumns(context);
initWhereExpr(fileGroup.getWhereExpr(), analyzer);
@@ -247,18 +247,18 @@ public class BrokerScanNode extends LoadScanNode {
} catch (AnalysisException e) {
throw new UserException(e.getMessage());
}
- brokerScanRange.addToBroker_addresses(new TNetworkAddress(broker.ip, broker.port));
+ brokerScanRange.addToBrokerAddresses(new TNetworkAddress(broker.ip, broker.port));
// Scan range
TScanRange scanRange = new TScanRange();
- scanRange.setBroker_scan_range(brokerScanRange);
+ scanRange.setBrokerScanRange(brokerScanRange);
// Locations
TScanRangeLocations locations = new TScanRangeLocations();
- locations.setScan_range(scanRange);
+ locations.setScanRange(scanRange);
TScanRangeLocation location = new TScanRangeLocation();
- location.setBackend_id(selectedBackend.getId());
+ location.setBackendId(selectedBackend.getId());
location.setServer(new TNetworkAddress(selectedBackend.getHost(), selectedBackend.getBePort()));
locations.addToLocations(location);
@@ -417,15 +417,15 @@ public class BrokerScanNode extends LoadScanNode {
TFileFormatType formatType, long rangeBytes,
List<String> columnsFromPath, int numberOfColumnsFromFile) {
TBrokerRangeDesc rangeDesc = new TBrokerRangeDesc();
- rangeDesc.setFile_type(TFileType.FILE_BROKER);
- rangeDesc.setFormat_type(formatType);
+ rangeDesc.setFileType(TFileType.FILE_BROKER);
+ rangeDesc.setFormatType(formatType);
rangeDesc.setPath(fileStatus.path);
rangeDesc.setSplittable(fileStatus.isSplitable);
- rangeDesc.setStart_offset(curFileOffset);
+ rangeDesc.setStartOffset(curFileOffset);
rangeDesc.setSize(rangeBytes);
- rangeDesc.setFile_size(fileStatus.size);
- rangeDesc.setNum_of_columns_from_file(numberOfColumnsFromFile);
- rangeDesc.setColumns_from_path(columnsFromPath);
+ rangeDesc.setFileSize(fileStatus.size);
+ rangeDesc.setNumOfColumnsFromFile(numberOfColumnsFromFile);
+ rangeDesc.setColumnsFromPath(columnsFromPath);
return rangeDesc;
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/planner/CsvScanNode.java b/fe/fe-core/src/main/java/org/apache/doris/planner/CsvScanNode.java
index 7eca58a..7b6e550 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/planner/CsvScanNode.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/planner/CsvScanNode.java
@@ -80,28 +80,28 @@ public class CsvScanNode extends ScanNode {
msg.csv_scan_node = new TCsvScanNode(desc.getId().asInt(), filePaths);
if (!Strings.isNullOrEmpty(columnSeparator)) {
- msg.csv_scan_node.setColumn_separator(columnSeparator);
+ msg.csv_scan_node.setColumnSeparator(columnSeparator);
}
if (!Strings.isNullOrEmpty(lineDelimiter)) {
- msg.csv_scan_node.setLine_delimiter(lineDelimiter);
+ msg.csv_scan_node.setLineDelimiter(lineDelimiter);
}
if (!columns.isEmpty()) {
msg.csv_scan_node.setColumns(columns);
}
if (!unspecifiedColumns.isEmpty()) {
- msg.csv_scan_node.setUnspecified_columns(unspecifiedColumns);
+ msg.csv_scan_node.setUnspecifiedColumns(unspecifiedColumns);
}
if (!defaultValues.isEmpty()) {
- msg.csv_scan_node.setDefault_values(defaultValues);
+ msg.csv_scan_node.setDefaultValues(defaultValues);
}
if (!columnToFunction.isEmpty()) {
- msg.csv_scan_node.setColumn_function_mapping(columnToFunction);
+ msg.csv_scan_node.setColumnFunctionMapping(columnToFunction);
}
- msg.csv_scan_node.setColumn_type_mapping(columnTypeMapping);
- msg.csv_scan_node.setMax_filter_ratio(maxFilterRatio);
- msg.csv_scan_node.setColumn_separator(columnSeparator);
+ msg.csv_scan_node.setColumnTypeMapping(columnTypeMapping);
+ msg.csv_scan_node.setMaxFilterRatio(maxFilterRatio);
+ msg.csv_scan_node.setColumnSeparator(columnSeparator);
}
@Override
@@ -173,8 +173,8 @@ public class CsvScanNode extends ScanNode {
}
}
if (find) {
- function.setFunction_name(pair.first);
- function.setParam_column_index(paramColumnIndex);
+ function.setFunctionName(pair.first);
+ function.setParamColumnIndex(paramColumnIndex);
columnToFunction.put(key, function);
break;
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/planner/DataPartition.java b/fe/fe-core/src/main/java/org/apache/doris/planner/DataPartition.java
index df72bac..2e9941d 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/planner/DataPartition.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/planner/DataPartition.java
@@ -103,10 +103,10 @@ public class DataPartition {
public TDataPartition toThrift() {
TDataPartition result = new TDataPartition(type);
if (partitionExprs != null) {
- result.setPartition_exprs(Expr.treesToThrift(partitionExprs));
+ result.setPartitionExprs(Expr.treesToThrift(partitionExprs));
}
if (partitions != null) {
- result.setPartition_infos(DataSplitSink.EtlRangePartitionInfo.listToThrift(partitions));
+ result.setPartitionInfos(DataSplitSink.EtlRangePartitionInfo.listToThrift(partitions));
}
return result;
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/planner/DataSplitSink.java b/fe/fe-core/src/main/java/org/apache/doris/planner/DataSplitSink.java
index 763dbc4..5da1f09 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/planner/DataSplitSink.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/planner/DataSplitSink.java
@@ -109,7 +109,7 @@ public class DataSplitSink extends DataSink {
RollupSchema.mapToThrift(rollups));
TDataSink tDataSink = new TDataSink(TDataSinkType.DATA_SPLIT_SINK);
- tDataSink.setSplit_sink(tSplitSink);
+ tDataSink.setSplitSink(tSplitSink);
return tDataSink;
}
@@ -140,10 +140,10 @@ public class DataSplitSink extends DataSink {
public TRollupSchema toThrift() {
TRollupSchema tRollupSchema = new TRollupSchema();
- tRollupSchema.setKeys_type(keysType.name());
+ tRollupSchema.setKeysType(keysType.name());
tRollupSchema.setKeys(Expr.treesToThrift(keys));
tRollupSchema.setValues(Expr.treesToThrift(values));
- tRollupSchema.setValue_ops(Lists.transform(valueOps,
+ tRollupSchema.setValueOps(Lists.transform(valueOps,
new Function<AggregateType, TAggregationType>() {
@Override
public TAggregationType apply(AggregateType aggregateType) {
@@ -303,8 +303,8 @@ public class DataSplitSink extends DataSink {
public TRangePartition toThrift(boolean containDist) {
TRangePartition tRangePartition = new TRangePartition(id, range.toThrift());
if (containDist) {
- tRangePartition.setDistributed_exprs(Expr.treesToThrift(distributeExprs));
- tRangePartition.setDistribute_bucket(distributeBuckets);
+ tRangePartition.setDistributedExprs(Expr.treesToThrift(distributeExprs));
+ tRangePartition.setDistributeBucket(distributeBuckets);
}
return tRangePartition;
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/planner/DataStreamSink.java b/fe/fe-core/src/main/java/org/apache/doris/planner/DataStreamSink.java
index a07c914..f07e647 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/planner/DataStreamSink.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/planner/DataStreamSink.java
@@ -64,7 +64,7 @@ public class DataStreamSink extends DataSink {
TDataSink result = new TDataSink(TDataSinkType.DATA_STREAM_SINK);
TDataStreamSink tStreamSink =
new TDataStreamSink(exchNodeId.asInt(), outputPartition.toThrift());
- result.setStream_sink(tStreamSink);
+ result.setStreamSink(tStreamSink);
return result;
}
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/planner/EsScanNode.java b/fe/fe-core/src/main/java/org/apache/doris/planner/EsScanNode.java
index 7db0e00..ecd807a 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/planner/EsScanNode.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/planner/EsScanNode.java
@@ -151,11 +151,11 @@ public class EsScanNode extends ScanNode {
TEsScanNode esScanNode = new TEsScanNode(desc.getId().asInt());
esScanNode.setProperties(properties);
if (table.isDocValueScanEnable()) {
- esScanNode.setDocvalue_context(table.docValueContext());
+ esScanNode.setDocvalueContext(table.docValueContext());
properties.put(EsTable.DOC_VALUES_MODE, String.valueOf(useDocValueScan(desc, table.docValueContext())));
}
if (table.isKeywordSniffEnable() && table.fieldsContext().size() > 0) {
- esScanNode.setFields_context(table.fieldsContext());
+ esScanNode.setFieldsContext(table.fieldsContext());
}
msg.es_scan_node = esScanNode;
}
@@ -237,21 +237,21 @@ public class EsScanNode extends ScanNode {
for (int i = 0; i < numBe && i < candidateBeList.size(); ++i) {
TScanRangeLocation location = new TScanRangeLocation();
Backend be = candidateBeList.get(i);
- location.setBackend_id(be.getId());
+ location.setBackendId(be.getId());
location.setServer(new TNetworkAddress(be.getHost(), be.getBePort()));
locations.addToLocations(location);
}
// Generate on es scan range
TEsScanRange esScanRange = new TEsScanRange();
- esScanRange.setEs_hosts(shardAllocations);
+ esScanRange.setEsHosts(shardAllocations);
esScanRange.setIndex(shardRouting.get(0).getIndexName());
esScanRange.setType(table.getMappingType());
- esScanRange.setShard_id(shardRouting.get(0).getShardId());
+ esScanRange.setShardId(shardRouting.get(0).getShardId());
// Scan range
TScanRange scanRange = new TScanRange();
- scanRange.setEs_scan_range(esScanRange);
- locations.setScan_range(scanRange);
+ scanRange.setEsScanRange(esScanRange);
+ locations.setScanRange(scanRange);
// result
result.add(locations);
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/planner/ExchangeNode.java b/fe/fe-core/src/main/java/org/apache/doris/planner/ExchangeNode.java
index 0ee81a1..350921f 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/planner/ExchangeNode.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/planner/ExchangeNode.java
@@ -109,13 +109,13 @@ public class ExchangeNode extends PlanNode {
msg.node_type = TPlanNodeType.EXCHANGE_NODE;
msg.exchange_node = new TExchangeNode();
for (TupleId tid : tupleIds) {
- msg.exchange_node.addToInput_row_tuples(tid.asInt());
+ msg.exchange_node.addToInputRowTuples(tid.asInt());
}
if (mergeInfo != null) {
TSortInfo sortInfo = new TSortInfo(
Expr.treesToThrift(mergeInfo.getOrderingExprs()), mergeInfo.getIsAscOrder(),
mergeInfo.getNullsFirst());
- msg.exchange_node.setSort_info(sortInfo);
+ msg.exchange_node.setSortInfo(sortInfo);
msg.exchange_node.setOffset(offset);
}
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/planner/ExportSink.java b/fe/fe-core/src/main/java/org/apache/doris/planner/ExportSink.java
index 75cecd1..3d678ad 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/planner/ExportSink.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/planner/ExportSink.java
@@ -68,11 +68,11 @@ public class ExportSink extends DataSink {
FsBroker broker = Catalog.getCurrentCatalog().getBrokerMgr().getAnyBroker(brokerDesc.getName());
if (broker != null) {
- tExportSink.addToBroker_addresses(new TNetworkAddress(broker.ip, broker.port));
+ tExportSink.addToBrokerAddresses(new TNetworkAddress(broker.ip, broker.port));
}
tExportSink.setProperties(brokerDesc.getProperties());
- result.setExport_sink(tExportSink);
+ result.setExportSink(tExportSink);
return result;
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/planner/HashJoinNode.java b/fe/fe-core/src/main/java/org/apache/doris/planner/HashJoinNode.java
index f6765e7..d3ead3f 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/planner/HashJoinNode.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/planner/HashJoinNode.java
@@ -258,12 +258,12 @@ public class HashJoinNode extends PlanNode {
TEqJoinCondition eqJoinCondition = new TEqJoinCondition(eqJoinPredicate.getChild(0).treeToThrift(),
eqJoinPredicate.getChild(1).treeToThrift());
eqJoinCondition.setOpcode(eqJoinPredicate.getOp().getOpcode());
- msg.hash_join_node.addToEq_join_conjuncts(eqJoinCondition);
+ msg.hash_join_node.addToEqJoinConjuncts(eqJoinCondition);
}
for (Expr e : otherJoinConjuncts) {
- msg.hash_join_node.addToOther_join_conjuncts(e.treeToThrift());
+ msg.hash_join_node.addToOtherJoinConjuncts(e.treeToThrift());
}
- msg.hash_join_node.setIs_push_down(isPushDown);
+ msg.hash_join_node.setIsPushDown(isPushDown);
}
@Override
diff --git a/fe/fe-core/src/main/java/org/apache/doris/planner/LoadScanNode.java b/fe/fe-core/src/main/java/org/apache/doris/planner/LoadScanNode.java
index 1f9bb3b..83446c8 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/planner/LoadScanNode.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/planner/LoadScanNode.java
@@ -164,12 +164,12 @@ public abstract class LoadScanNode extends ScanNode {
expr.analyze(analyzer);
}
expr = castToSlot(destSlotDesc, expr);
- params.putToExpr_of_dest_slot(destSlotDesc.getId().asInt(), expr.treeToThrift());
+ params.putToExprOfDestSlot(destSlotDesc.getId().asInt(), expr.treeToThrift());
}
- params.setDest_sid_to_src_sid_without_trans(destSidToSrcSidWithoutTrans);
- params.setDest_tuple_id(desc.getId().asInt());
- params.setStrict_mode(strictMode);
- params.setSrc_tuple_id(srcTupleDesc.getId().asInt());
+ params.setDestSidToSrcSidWithoutTrans(destSidToSrcSidWithoutTrans);
+ params.setDestTupleId(desc.getId().asInt());
+ params.setStrictMode(strictMode);
+ params.setSrcTupleId(srcTupleDesc.getId().asInt());
// LOG.info("brokerScanRange is {}", brokerScanRange);
// Need re compute memory layout after set some slot descriptor to nullable
@@ -178,8 +178,8 @@ public abstract class LoadScanNode extends ScanNode {
@Override
protected void toThrift(TPlanNode planNode) {
- planNode.setNode_type(TPlanNodeType.BROKER_SCAN_NODE);
+ planNode.setNodeType(TPlanNodeType.BROKER_SCAN_NODE);
TBrokerScanNode brokerScanNode = new TBrokerScanNode(desc.getId().asInt());
- planNode.setBroker_scan_node(brokerScanNode);
+ planNode.setBrokerScanNode(brokerScanNode);
}
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/planner/MergeJoinNode.java b/fe/fe-core/src/main/java/org/apache/doris/planner/MergeJoinNode.java
index 53c9b82..2ac7e8f 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/planner/MergeJoinNode.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/planner/MergeJoinNode.java
@@ -117,10 +117,10 @@ public class MergeJoinNode extends PlanNode {
for (Pair<Expr, Expr> entry : cmpConjuncts) {
TEqJoinCondition eqJoinCondition =
new TEqJoinCondition(entry.first.treeToThrift(), entry.second.treeToThrift());
- msg.merge_join_node.addToCmp_conjuncts(eqJoinCondition);
+ msg.merge_join_node.addToCmpConjuncts(eqJoinCondition);
}
for (Expr e : otherJoinConjuncts) {
- msg.hash_join_node.addToOther_join_conjuncts(e.treeToThrift());
+ msg.hash_join_node.addToOtherJoinConjuncts(e.treeToThrift());
}
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/planner/MysqlTableSink.java b/fe/fe-core/src/main/java/org/apache/doris/planner/MysqlTableSink.java
index 6d8cc77..d1b7edc 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/planner/MysqlTableSink.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/planner/MysqlTableSink.java
@@ -49,7 +49,7 @@ public class MysqlTableSink extends DataSink {
protected TDataSink toThrift() {
TDataSink tDataSink = new TDataSink(TDataSinkType.MYSQL_TABLE_SINK);
- tDataSink.setMysql_table_sink(new TMysqlTableSink(host, port, user, passwd, db, tbl));
+ tDataSink.setMysqlTableSink(new TMysqlTableSink(host, port, user, passwd, db, tbl));
return tDataSink;
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/planner/OlapRewriteNode.java b/fe/fe-core/src/main/java/org/apache/doris/planner/OlapRewriteNode.java
index 4759dba..42bdae2 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/planner/OlapRewriteNode.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/planner/OlapRewriteNode.java
@@ -92,13 +92,13 @@ public class OlapRewriteNode extends PlanNode {
msg.node_type = TPlanNodeType.OLAP_REWRITE_NODE;
TOlapRewriteNode tnode = new TOlapRewriteNode();
for (Column column : table.getBaseSchema()) {
- tnode.addToColumn_types(column.getOriginType().toColumnTypeThrift());
+ tnode.addToColumnTypes(column.getOriginType().toColumnTypeThrift());
}
for (Expr expr : newResultExprs) {
tnode.addToColumns(expr.treeToThrift());
}
- tnode.setOutput_tuple_id(tupleDescriptor.getId().asInt());
- msg.setOlap_rewrite_node(tnode);
+ tnode.setOutputTupleId(tupleDescriptor.getId().asInt());
+ msg.setOlapRewriteNode(tnode);
}
@Override
diff --git a/fe/fe-core/src/main/java/org/apache/doris/planner/OlapScanNode.java b/fe/fe-core/src/main/java/org/apache/doris/planner/OlapScanNode.java
index 187c1d0..36ad52c 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/planner/OlapScanNode.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/planner/OlapScanNode.java
@@ -372,11 +372,11 @@ public class OlapScanNode extends ScanNode {
TScanRangeLocations scanRangeLocations = new TScanRangeLocations();
TPaloScanRange paloRange = new TPaloScanRange();
- paloRange.setDb_name("");
- paloRange.setSchema_hash(schemaHashStr);
+ paloRange.setDbName("");
+ paloRange.setSchemaHash(schemaHashStr);
paloRange.setVersion(visibleVersionStr);
- paloRange.setVersion_hash(visibleVersionHashStr);
- paloRange.setTablet_id(tabletId);
+ paloRange.setVersionHash(visibleVersionHashStr);
+ paloRange.setTabletId(tabletId);
// random shuffle List && only collect one copy
List<Replica> allQueryableReplicas = Lists.newArrayList();
@@ -413,7 +413,7 @@ public class OlapScanNode extends ScanNode {
String ip = backend.getHost();
int port = backend.getBePort();
TScanRangeLocation scanRangeLocation = new TScanRangeLocation(new TNetworkAddress(ip, port));
- scanRangeLocation.setBackend_id(replica.getBackendId());
+ scanRangeLocation.setBackendId(replica.getBackendId());
scanRangeLocations.addToLocations(scanRangeLocation);
paloRange.addToHosts(new TNetworkAddress(ip, port));
tabletIsNull = false;
@@ -430,8 +430,8 @@ public class OlapScanNode extends ScanNode {
throw new UserException(tabletId + "have no alive replicas");
}
TScanRange scanRange = new TScanRange();
- scanRange.setPalo_scan_range(paloRange);
- scanRangeLocations.setScan_range(scanRange);
+ scanRange.setPaloScanRange(paloRange);
+ scanRangeLocations.setScanRange(scanRange);
bucketSeq2locations.put(tabletId2BucketSeq.get(tabletId), scanRangeLocations);
@@ -624,7 +624,7 @@ public class OlapScanNode extends ScanNode {
msg.olap_scan_node =
new TOlapScanNode(desc.getId().asInt(), keyColumnNames, keyColumnTypes, isPreAggregation);
if (null != sortColumn) {
- msg.olap_scan_node.setSort_column(sortColumn);
+ msg.olap_scan_node.setSortColumn(sortColumn);
}
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/planner/OlapTableSink.java b/fe/fe-core/src/main/java/org/apache/doris/planner/OlapTableSink.java
index 38f4f14..af20dad 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/planner/OlapTableSink.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/planner/OlapTableSink.java
@@ -91,13 +91,13 @@ public class OlapTableSink extends DataSink {
public void init(TUniqueId loadId, long txnId, long dbId, long loadChannelTimeoutS) throws AnalysisException {
TOlapTableSink tSink = new TOlapTableSink();
- tSink.setLoad_id(loadId);
- tSink.setTxn_id(txnId);
- tSink.setDb_id(dbId);
- tSink.setLoad_channel_timeout_s(loadChannelTimeoutS);
+ tSink.setLoadId(loadId);
+ tSink.setTxnId(txnId);
+ tSink.setDbId(dbId);
+ tSink.setLoadChannelTimeoutS(loadChannelTimeoutS);
tDataSink = new TDataSink(TDataSinkType.DATA_SPLIT_SINK);
tDataSink.setType(TDataSinkType.OLAP_TABLE_SINK);
- tDataSink.setOlap_table_sink(tSink);
+ tDataSink.setOlapTableSink(tSink);
for (Long partitionId : partitionIds) {
Partition part = dstTable.getPartition(partitionId);
@@ -108,26 +108,26 @@ public class OlapTableSink extends DataSink {
}
public void updateLoadId(TUniqueId newLoadId) {
- tDataSink.getOlap_table_sink().setLoad_id(newLoadId);
+ tDataSink.getOlapTableSink().setLoadId(newLoadId);
}
// must called after tupleDescriptor is computed
public void complete() throws UserException {
- TOlapTableSink tSink = tDataSink.getOlap_table_sink();
+ TOlapTableSink tSink = tDataSink.getOlapTableSink();
- tSink.setTable_id(dstTable.getId());
- tSink.setTuple_id(tupleDescriptor.getId().asInt());
+ tSink.setTableId(dstTable.getId());
+ tSink.setTupleId(tupleDescriptor.getId().asInt());
int numReplicas = 1;
for (Partition partition : dstTable.getPartitions()) {
numReplicas = dstTable.getPartitionInfo().getReplicationNum(partition.getId());
break;
}
- tSink.setNum_replicas(numReplicas);
- tSink.setNeed_gen_rollup(dstTable.shouldLoadToNewRollup());
- tSink.setSchema(createSchema(tSink.getDb_id(), dstTable));
- tSink.setPartition(createPartition(tSink.getDb_id(), dstTable));
+ tSink.setNumReplicas(numReplicas);
+ tSink.setNeedGenRollup(dstTable.shouldLoadToNewRollup());
+ tSink.setSchema(createSchema(tSink.getDbId(), dstTable));
+ tSink.setPartition(createPartition(tSink.getDbId(), dstTable));
tSink.setLocation(createLocation(dstTable));
- tSink.setNodes_info(createPaloNodesInfo());
+ tSink.setNodesInfo(createPaloNodesInfo());
}
@Override
@@ -156,13 +156,13 @@ public class OlapTableSink extends DataSink {
private TOlapTableSchemaParam createSchema(long dbId, OlapTable table) {
TOlapTableSchemaParam schemaParam = new TOlapTableSchemaParam();
- schemaParam.setDb_id(dbId);
- schemaParam.setTable_id(table.getId());
+ schemaParam.setDbId(dbId);
+ schemaParam.setTableId(table.getId());
schemaParam.setVersion(0);
schemaParam.tuple_desc = tupleDescriptor.toThrift();
for (SlotDescriptor slotDesc : tupleDescriptor.getSlots()) {
- schemaParam.addToSlot_descs(slotDesc.toThrift());
+ schemaParam.addToSlotDescs(slotDesc.toThrift());
}
for (Map.Entry<Long, MaterializedIndexMeta> pair : table.getIndexIdToMeta().entrySet()) {
@@ -202,8 +202,8 @@ public class OlapTableSink extends DataSink {
private TOlapTablePartitionParam createPartition(long dbId, OlapTable table) throws UserException {
TOlapTablePartitionParam partitionParam = new TOlapTablePartitionParam();
- partitionParam.setDb_id(dbId);
- partitionParam.setTable_id(table.getId());
+ partitionParam.setDbId(dbId);
+ partitionParam.setTableId(table.getId());
partitionParam.setVersion(0);
PartitionType partType = table.getPartitionInfo().getType();
@@ -211,7 +211,7 @@ public class OlapTableSink extends DataSink {
case RANGE: {
RangePartitionInfo rangePartitionInfo = (RangePartitionInfo) table.getPartitionInfo();
for (Column partCol : rangePartitionInfo.getPartitionColumns()) {
- partitionParam.addToPartition_columns(partCol.getName());
+ partitionParam.addToPartitionColumns(partCol.getName());
}
int partColNum = rangePartitionInfo.getPartitionColumns().size();
@@ -225,26 +225,26 @@ public class OlapTableSink extends DataSink {
// set start keys
if (range.hasLowerBound() && !range.lowerEndpoint().isMinValue()) {
for (int i = 0; i < partColNum; i++) {
- tPartition.addToStart_keys(range.lowerEndpoint().getKeys().get(i).treeToThrift().getNodes().get(0));
+ tPartition.addToStartKeys(range.lowerEndpoint().getKeys().get(i).treeToThrift().getNodes().get(0));
}
}
// set end keys
if (range.hasUpperBound() && !range.upperEndpoint().isMaxValue()) {
for (int i = 0; i < partColNum; i++) {
- tPartition.addToEnd_keys(range.upperEndpoint().getKeys().get(i).treeToThrift().getNodes().get(0));
+ tPartition.addToEndKeys(range.upperEndpoint().getKeys().get(i).treeToThrift().getNodes().get(0));
}
}
for (MaterializedIndex index : partition.getMaterializedIndices(IndexExtState.ALL)) {
tPartition.addToIndexes(new TOlapTableIndexTablets(index.getId(), Lists.newArrayList(
index.getTablets().stream().map(Tablet::getId).collect(Collectors.toList()))));
- tPartition.setNum_buckets(index.getTablets().size());
+ tPartition.setNumBuckets(index.getTablets().size());
}
partitionParam.addToPartitions(tPartition);
DistributionInfo distInfo = partition.getDistributionInfo();
if (selectedDistInfo == null) {
- partitionParam.setDistributed_columns(getDistColumns(distInfo, table));
+ partitionParam.setDistributedColumns(getDistColumns(distInfo, table));
selectedDistInfo = distInfo;
} else {
if (selectedDistInfo.getType() != distInfo.getType()) {
@@ -268,10 +268,10 @@ public class OlapTableSink extends DataSink {
for (MaterializedIndex index : partition.getMaterializedIndices(IndexExtState.ALL)) {
tPartition.addToIndexes(new TOlapTableIndexTablets(index.getId(), Lists.newArrayList(
index.getTablets().stream().map(Tablet::getId).collect(Collectors.toList()))));
- tPartition.setNum_buckets(index.getTablets().size());
+ tPartition.setNumBuckets(index.getTablets().size());
}
partitionParam.addToPartitions(tPartition);
- partitionParam.setDistributed_columns(
+ partitionParam.setDistributedColumns(
getDistColumns(partition.getDistributionInfo(), table));
break;
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/planner/PlanFragment.java b/fe/fe-core/src/main/java/org/apache/doris/planner/PlanFragment.java
index ecff1a5..b859995 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/planner/PlanFragment.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/planner/PlanFragment.java
@@ -201,16 +201,16 @@ public class PlanFragment extends TreeNode<PlanFragment> {
result.setPlan(planRoot.treeToThrift());
}
if (outputExprs != null) {
- result.setOutput_exprs(Expr.treesToThrift(outputExprs));
+ result.setOutputExprs(Expr.treesToThrift(outputExprs));
}
if (sink != null) {
- result.setOutput_sink(sink.toThrift());
+ result.setOutputSink(sink.toThrift());
}
result.setPartition(dataPartition.toThrift());
// TODO chenhao , calculated by cost
- result.setMin_reservation_bytes(0);
- result.setInitial_reservation_total_claims(0);
+ result.setMinReservationBytes(0);
+ result.setInitialReservationTotalClaims(0);
return result;
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/planner/PlanNode.java b/fe/fe-core/src/main/java/org/apache/doris/planner/PlanNode.java
index ffd2e38..3e47013 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/planner/PlanNode.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/planner/PlanNode.java
@@ -371,8 +371,8 @@ abstract public class PlanNode extends TreeNode<PlanNode> {
msg.num_children = children.size();
msg.limit = limit;
for (TupleId tid : tupleIds) {
- msg.addToRow_tuples(tid.asInt());
- msg.addToNullable_tuples(nullableTupleIds.contains(tid));
+ msg.addToRowTuples(tid.asInt());
+ msg.addToNullableTuples(nullableTupleIds.contains(tid));
}
for (Expr e : conjuncts) {
msg.addToConjuncts(e.treeToThrift());
diff --git a/fe/fe-core/src/main/java/org/apache/doris/planner/ResultSink.java b/fe/fe-core/src/main/java/org/apache/doris/planner/ResultSink.java
index 688c2cb..547dfb3 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/planner/ResultSink.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/planner/ResultSink.java
@@ -59,9 +59,9 @@ public class ResultSink extends DataSink {
TResultSink tResultSink = new TResultSink();
tResultSink.setType(sinkType);
if (fileSinkOptions != null) {
- tResultSink.setFile_options(fileSinkOptions);
+ tResultSink.setFileOptions(fileSinkOptions);
}
- result.setResult_sink(tResultSink);
+ result.setResultSink(tResultSink);
return result;
}
@@ -95,6 +95,6 @@ public class ResultSink extends DataSink {
public void setBrokerAddr(String ip, int port) {
Preconditions.checkNotNull(fileSinkOptions);
- fileSinkOptions.setBroker_addresses(Lists.newArrayList(new TNetworkAddress(ip, port)));
+ fileSinkOptions.setBrokerAddresses(Lists.newArrayList(new TNetworkAddress(ip, port)));
}
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/planner/SchemaScanNode.java b/fe/fe-core/src/main/java/org/apache/doris/planner/SchemaScanNode.java
index aaa31b9..d54ad97 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/planner/SchemaScanNode.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/planner/SchemaScanNode.java
@@ -101,13 +101,13 @@ public class SchemaScanNode extends ScanNode {
ConnectContext ctx = ConnectContext.get();
if (ctx != null) {
- msg.schema_scan_node.setThread_id(ConnectContext.get().getConnectionId());
+ msg.schema_scan_node.setThreadId(ConnectContext.get().getConnectionId());
}
msg.schema_scan_node.setIp(frontendIP);
msg.schema_scan_node.setPort(frontendPort);
TUserIdentity tCurrentUser = ConnectContext.get().getCurrentUserIdentity().toThrift();
- msg.schema_scan_node.setCurrent_user_ident(tCurrentUser);
+ msg.schema_scan_node.setCurrentUserIdent(tCurrentUser);
}
/**
diff --git a/fe/fe-core/src/main/java/org/apache/doris/planner/SingleNodePlanner.java b/fe/fe-core/src/main/java/org/apache/doris/planner/SingleNodePlanner.java
index 345a131..24ee4a3 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/planner/SingleNodePlanner.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/planner/SingleNodePlanner.java
@@ -149,7 +149,7 @@ public class SingleNodePlanner {
LOG.trace("desctbl: " + analyzer.getDescTbl().debugString());
}
PlanNode singleNodePlan = createQueryPlan(queryStmt, analyzer,
- ctx_.getQueryOptions().getDefault_order_by_limit());
+ ctx_.getQueryOptions().getDefaultOrderByLimit());
Preconditions.checkNotNull(singleNodePlan);
return singleNodePlan;
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/planner/SortNode.java b/fe/fe-core/src/main/java/org/apache/doris/planner/SortNode.java
index 4bc85f9..97c2c5b 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/planner/SortNode.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/planner/SortNode.java
@@ -154,18 +154,18 @@ public class SortNode extends PlanNode {
info.getIsAscOrder(),
info.getNullsFirst());
Preconditions.checkState(tupleIds.size() == 1, "Incorrect size for tupleIds in SortNode");
- sortInfo.setSort_tuple_slot_exprs(Expr.treesToThrift(resolvedTupleExprs));
+ sortInfo.setSortTupleSlotExprs(Expr.treesToThrift(resolvedTupleExprs));
TSortNode sortNode = new TSortNode(sortInfo, useTopN);
msg.sort_node = sortNode;
msg.sort_node.setOffset(offset);
// TODO(lingbin): remove blew codes, because it is duplicate with TSortInfo
- msg.sort_node.setOrdering_exprs(Expr.treesToThrift(info.getOrderingExprs()));
- msg.sort_node.setIs_asc_order(info.getIsAscOrder());
- msg.sort_node.setNulls_first(info.getNullsFirst());
+ msg.sort_node.setOrderingExprs(Expr.treesToThrift(info.getOrderingExprs()));
+ msg.sort_node.setIsAscOrder(info.getIsAscOrder());
+ msg.sort_node.setNullsFirst(info.getNullsFirst());
if (info.getSortTupleSlotExprs() != null) {
- msg.sort_node.setSort_tuple_slot_exprs(Expr.treesToThrift(info.getSortTupleSlotExprs()));
+ msg.sort_node.setSortTupleSlotExprs(Expr.treesToThrift(info.getSortTupleSlotExprs()));
}
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/planner/StreamLoadPlanner.java b/fe/fe-core/src/main/java/org/apache/doris/planner/StreamLoadPlanner.java
index f4b1e1b..cc16683 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/planner/StreamLoadPlanner.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/planner/StreamLoadPlanner.java
@@ -140,47 +140,47 @@ public class StreamLoadPlanner {
fragment.finalize(null, false);
TExecPlanFragmentParams params = new TExecPlanFragmentParams();
- params.setProtocol_version(PaloInternalServiceVersion.V1);
+ params.setProtocolVersion(PaloInternalServiceVersion.V1);
params.setFragment(fragment.toThrift());
- params.setDesc_tbl(analyzer.getDescTbl().toThrift());
+ params.setDescTbl(analyzer.getDescTbl().toThrift());
TPlanFragmentExecParams execParams = new TPlanFragmentExecParams();
// user load id (streamLoadTask.id) as query id
- execParams.setQuery_id(loadId);
- execParams.setFragment_instance_id(new TUniqueId(loadId.hi, loadId.lo + 1));
+ execParams.setQueryId(loadId);
+ execParams.setFragmentInstanceId(new TUniqueId(loadId.hi, loadId.lo + 1));
execParams.per_exch_num_senders = Maps.newHashMap();
execParams.destinations = Lists.newArrayList();
Map<Integer, List<TScanRangeParams>> perNodeScanRange = Maps.newHashMap();
List<TScanRangeParams> scanRangeParams = Lists.newArrayList();
for (TScanRangeLocations locations : scanNode.getScanRangeLocations(0)) {
- scanRangeParams.add(new TScanRangeParams(locations.getScan_range()));
+ scanRangeParams.add(new TScanRangeParams(locations.getScanRange()));
}
// For stream load, only one sender
- execParams.setSender_id(0);
- execParams.setNum_senders(1);
+ execParams.setSenderId(0);
+ execParams.setNumSenders(1);
perNodeScanRange.put(scanNode.getId().asInt(), scanRangeParams);
- execParams.setPer_node_scan_ranges(perNodeScanRange);
+ execParams.setPerNodeScanRanges(perNodeScanRange);
params.setParams(execParams);
TQueryOptions queryOptions = new TQueryOptions();
- queryOptions.setQuery_type(TQueryType.LOAD);
- queryOptions.setQuery_timeout(taskInfo.getTimeout());
- queryOptions.setMem_limit(taskInfo.getMemLimit());
+ queryOptions.setQueryType(TQueryType.LOAD);
+ queryOptions.setQueryTimeout(taskInfo.getTimeout());
+ queryOptions.setMemLimit(taskInfo.getMemLimit());
// for stream load, we use exec_mem_limit to limit the memory usage of load channel.
- queryOptions.setLoad_mem_limit(taskInfo.getMemLimit());
- params.setQuery_options(queryOptions);
+ queryOptions.setLoadMemLimit(taskInfo.getMemLimit());
+ params.setQueryOptions(queryOptions);
TQueryGlobals queryGlobals = new TQueryGlobals();
- queryGlobals.setNow_string(DATE_FORMAT.format(new Date()));
- queryGlobals.setTimestamp_ms(new Date().getTime());
- queryGlobals.setTime_zone(taskInfo.getTimezone());
- params.setQuery_globals(queryGlobals);
+ queryGlobals.setNowString(DATE_FORMAT.format(new Date()));
+ queryGlobals.setTimestampMs(new Date().getTime());
+ queryGlobals.setTimeZone(taskInfo.getTimezone());
+ params.setQueryGlobals(queryGlobals);
// set load error hub if exist
LoadErrorHub.Param param = Catalog.getCurrentCatalog().getLoadInstance().getLoadErrorHubInfo();
if (param != null) {
TLoadErrorHubInfo info = param.toThrift();
if (info != null) {
- params.setLoad_error_hub_info(info);
+ params.setLoadErrorHubInfo(info);
}
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/planner/StreamLoadScanNode.java b/fe/fe-core/src/main/java/org/apache/doris/planner/StreamLoadScanNode.java
index 39bb38f..801c181 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/planner/StreamLoadScanNode.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/planner/StreamLoadScanNode.java
@@ -90,9 +90,9 @@ public class StreamLoadScanNode extends LoadScanNode {
rangeDesc.setJsonpaths(taskInfo.getJsonPaths());
}
if (!taskInfo.getJsonRoot().isEmpty()) {
- rangeDesc.setJson_root(taskInfo.getJsonRoot());
+ rangeDesc.setJsonRoot(taskInfo.getJsonRoot());
}
- rangeDesc.setStrip_outer_array(taskInfo.isStripOuterArray());
+ rangeDesc.setStripOuterArray(taskInfo.isStripOuterArray());
}
rangeDesc.splittable = false;
switch (taskInfo.getFileType()) {
@@ -128,15 +128,15 @@ public class StreamLoadScanNode extends LoadScanNode {
if (taskInfo.getColumnSeparator() != null) {
String sep = taskInfo.getColumnSeparator().getColumnSeparator();
- params.setColumn_separator(sep.getBytes(Charset.forName("UTF-8"))[0]);
+ params.setColumnSeparator(sep.getBytes(Charset.forName("UTF-8"))[0]);
} else {
- params.setColumn_separator((byte) '\t');
+ params.setColumnSeparator((byte) '\t');
}
- params.setLine_delimiter((byte) '\n');
- params.setDest_tuple_id(desc.getId().asInt());
+ params.setLineDelimiter((byte) '\n');
+ params.setDestTupleId(desc.getId().asInt());
brokerScanRange.setParams(params);
- brokerScanRange.setBroker_addresses(Lists.newArrayList());
+ brokerScanRange.setBrokerAddresses(Lists.newArrayList());
}
@Override
@@ -149,8 +149,8 @@ public class StreamLoadScanNode extends LoadScanNode {
public List<TScanRangeLocations> getScanRangeLocations(long maxScanRangeLength) {
TScanRangeLocations locations = new TScanRangeLocations();
TScanRange scanRange = new TScanRange();
- scanRange.setBroker_scan_range(brokerScanRange);
- locations.setScan_range(scanRange);
+ scanRange.setBrokerScanRange(brokerScanRange);
+ locations.setScanRange(scanRange);
locations.setLocations(Lists.newArrayList());
return Lists.newArrayList(locations);
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/ConnectProcessor.java b/fe/fe-core/src/main/java/org/apache/doris/qe/ConnectProcessor.java
index a286980..64262cc 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/qe/ConnectProcessor.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/qe/ConnectProcessor.java
@@ -393,14 +393,14 @@ public class ConnectProcessor {
if (request.isSetResourceInfo()) {
ctx.getSessionVariable().setResourceGroup(request.getResourceInfo().getGroup());
}
- if (request.isSetUser_ip()) {
- ctx.setRemoteIP(request.getUser_ip());
+ if (request.isSetUserIp()) {
+ ctx.setRemoteIP(request.getUserIp());
}
- if (request.isSetTime_zone()) {
- ctx.getSessionVariable().setTimeZone(request.getTime_zone());
+ if (request.isSetTimeZone()) {
+ ctx.getSessionVariable().setTimeZone(request.getTimeZone());
}
- if (request.isSetStmt_id()) {
- ctx.setForwardedStmtId(request.getStmt_id());
+ if (request.isSetStmtId()) {
+ ctx.setForwardedStmtId(request.getStmtId());
}
if (request.isSetSqlMode()) {
ctx.getSessionVariable().setSqlMode(request.sqlMode);
@@ -408,28 +408,28 @@ public class ConnectProcessor {
if (request.isSetEnableStrictMode()) {
ctx.getSessionVariable().setEnableInsertStrict(request.enableStrictMode);
}
- if (request.isSetCurrent_user_ident()) {
- UserIdentity currentUserIdentity = UserIdentity.fromThrift(request.getCurrent_user_ident());
+ if (request.isSetCurrentUserIdent()) {
+ UserIdentity currentUserIdentity = UserIdentity.fromThrift(request.getCurrentUserIdent());
ctx.setCurrentUserIdentity(currentUserIdentity);
}
- if (request.isSetQuery_options()) {
- TQueryOptions queryOptions = request.getQuery_options();
- if (queryOptions.isSetMem_limit()) {
- ctx.getSessionVariable().setMaxExecMemByte(queryOptions.getMem_limit());
+ if (request.isSetQueryOptions()) {
+ TQueryOptions queryOptions = request.getQueryOptions();
+ if (queryOptions.isSetMemLimit()) {
+ ctx.getSessionVariable().setMaxExecMemByte(queryOptions.getMemLimit());
}
- if (queryOptions.isSetQuery_timeout()) {
- ctx.getSessionVariable().setQueryTimeoutS(queryOptions.getQuery_timeout());
+ if (queryOptions.isSetQueryTimeout()) {
+ ctx.getSessionVariable().setQueryTimeoutS(queryOptions.getQueryTimeout());
}
- if (queryOptions.isSetLoad_mem_limit()) {
- ctx.getSessionVariable().setLoadMemLimit(queryOptions.getLoad_mem_limit());
+ if (queryOptions.isSetLoadMemLimit()) {
+ ctx.getSessionVariable().setLoadMemLimit(queryOptions.getLoadMemLimit());
}
- if (queryOptions.isSetMax_scan_key_num()) {
- ctx.getSessionVariable().setMaxScanKeyNum(queryOptions.getMax_scan_key_num());
+ if (queryOptions.isSetMaxScanKeyNum()) {
+ ctx.getSessionVariable().setMaxScanKeyNum(queryOptions.getMaxScanKeyNum());
}
- if (queryOptions.isSetMax_pushdown_conditions_per_column()) {
+ if (queryOptions.isSetMaxPushdownConditionsPerColumn()) {
ctx.getSessionVariable().setMaxPushdownConditionsPerColumn(
- queryOptions.getMax_pushdown_conditions_per_column());
+ queryOptions.getMaxPushdownConditionsPerColumn());
}
} else {
// for compatibility, all following variables are moved to TQueryOptions.
diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/Coordinator.java b/fe/fe-core/src/main/java/org/apache/doris/qe/Coordinator.java
index 09e3873..60707a0 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/qe/Coordinator.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/qe/Coordinator.java
@@ -206,12 +206,12 @@ public class Coordinator {
this.descTable = analyzer.getDescTbl().toThrift();
this.returnedAllResults = false;
this.queryOptions = context.getSessionVariable().toThrift();
- this.queryGlobals.setNow_string(DATE_FORMAT.format(new Date()));
- this.queryGlobals.setTimestamp_ms(new Date().getTime());
+ this.queryGlobals.setNowString(DATE_FORMAT.format(new Date()));
+ this.queryGlobals.setTimestampMs(new Date().getTime());
if (context.getSessionVariable().getTimeZone().equals("CST")) {
- this.queryGlobals.setTime_zone(TimeUtils.DEFAULT_TIME_ZONE);
+ this.queryGlobals.setTimeZone(TimeUtils.DEFAULT_TIME_ZONE);
} else {
- this.queryGlobals.setTime_zone(context.getSessionVariable().getTimeZone());
+ this.queryGlobals.setTimeZone(context.getSessionVariable().getTimeZone());
}
this.tResourceInfo = new TResourceInfo(context.getQualifiedUser(),
context.getSessionVariable().getResourceGroup());
@@ -232,9 +232,9 @@ public class Coordinator {
this.fragments = fragments;
this.scanNodes = scanNodes;
this.queryOptions = new TQueryOptions();
- this.queryGlobals.setNow_string(DATE_FORMAT.format(new Date()));
- this.queryGlobals.setTimestamp_ms(new Date().getTime());
- this.queryGlobals.setTime_zone(timezone);
+ this.queryGlobals.setNowString(DATE_FORMAT.format(new Date()));
+ this.queryGlobals.setTimestampMs(new Date().getTime());
+ this.queryGlobals.setTimeZone(timezone);
this.tResourceInfo = new TResourceInfo("", "");
this.needReport = true;
this.clusterName = cluster;
@@ -256,7 +256,7 @@ public class Coordinator {
}
public void setQueryType(TQueryType type) {
- this.queryOptions.setQuery_type(type);
+ this.queryOptions.setQueryType(type);
}
public Status getExecStatus() {
@@ -280,15 +280,15 @@ public class Coordinator {
}
public void setExecMemoryLimit(long execMemoryLimit) {
- this.queryOptions.setMem_limit(execMemoryLimit);
+ this.queryOptions.setMemLimit(execMemoryLimit);
}
public void setLoadMemLimit(long loadMemLimit) {
- this.queryOptions.setLoad_mem_limit(loadMemLimit);
+ this.queryOptions.setLoadMemLimit(loadMemLimit);
}
public void setTimeout(int timeout) {
- this.queryOptions.setQuery_timeout(timeout);
+ this.queryOptions.setQueryTimeout(timeout);
}
public void clearExportStatus() {
@@ -424,7 +424,7 @@ public class Coordinator {
} else {
// This is a load process.
- this.queryOptions.setIs_report_success(true);
+ this.queryOptions.setIsReportSuccess(true);
deltaUrls = Lists.newArrayList();
loadCounters = Maps.newHashMap();
List<Long> relatedBackendIds = Lists.newArrayList(addressToBackendID.values());
@@ -445,7 +445,7 @@ public class Coordinator {
// execute all instances from up to bottom
int backendId = 0;
int profileFragmentId = 0;
- long memoryLimit = queryOptions.getMem_limit();
+ long memoryLimit = queryOptions.getMemLimit();
for (PlanFragment fragment : fragments) {
FragmentExecParams params = fragmentExecParamsMap.get(fragment.getFragmentId());
@@ -461,12 +461,12 @@ public class Coordinator {
long newmemory = memoryLimit / rate;
for (TExecPlanFragmentParams tParam : tParams) {
- tParam.query_options.setMem_limit(newmemory);
+ tParam.query_options.setMemLimit(newmemory);
}
}
boolean needCheckBackendState = false;
- if (queryOptions.getQuery_type() == TQueryType.LOAD && profileFragmentId == 0) {
+ if (queryOptions.getQueryType() == TQueryType.LOAD && profileFragmentId == 0) {
// this is a load process, and it is the first fragment.
// we should add all BackendExecState of this fragment to needCheckBackendExecStates,
// so that we can check these backends' state when joining this Coordinator
@@ -788,7 +788,7 @@ public class Coordinator {
TPlanFragmentDestination dest = new TPlanFragmentDestination();
dest.fragment_instance_id = destParams.instanceExecParams.get(j).instanceId;
dest.server = toRpcHost(destParams.instanceExecParams.get(j).host);
- dest.setBrpc_server(toBrpcHost(destParams.instanceExecParams.get(j).host));
+ dest.setBrpcServer(toBrpcHost(destParams.instanceExecParams.get(j).host));
params.destinations.add(dest);
}
}
@@ -1206,7 +1206,7 @@ public class Coordinator {
TScanRangeParams scanRangeParams = new TScanRangeParams();
scanRangeParams.scan_range = scanRangeLocations.scan_range;
// Volume is optional, so we need to set the value and the is-set bit
- scanRangeParams.setVolume_id(minLocation.volume_id);
+ scanRangeParams.setVolumeId(minLocation.volume_id);
scanRangeParamsList.add(scanRangeParams);
}
}
@@ -1229,7 +1229,7 @@ public class Coordinator {
execState.printProfile(builder);
LOG.debug("profile for query_id={} instance_id={}\n{}",
DebugUtil.printId(queryId),
- DebugUtil.printId(params.getFragment_instance_id()),
+ DebugUtil.printId(params.getFragmentInstanceId()),
builder.toString());
}
@@ -1239,29 +1239,29 @@ public class Coordinator {
// (UpdateStatus() initiates cancellation, if it hasn't already been initiated)
if (!(returnedAllResults && status.isCancelled()) && !status.ok()) {
LOG.warn("one instance report fail, query_id={} instance_id={}",
- DebugUtil.printId(queryId), DebugUtil.printId(params.getFragment_instance_id()));
- updateStatus(status, params.getFragment_instance_id());
+ DebugUtil.printId(queryId), DebugUtil.printId(params.getFragmentInstanceId()));
+ updateStatus(status, params.getFragmentInstanceId());
}
if (execState.done) {
- if (params.isSetDelta_urls()) {
- updateDeltas(params.getDelta_urls());
+ if (params.isSetDeltaUrls()) {
+ updateDeltas(params.getDeltaUrls());
}
- if (params.isSetLoad_counters()) {
- updateLoadCounters(params.getLoad_counters());
+ if (params.isSetLoadCounters()) {
+ updateLoadCounters(params.getLoadCounters());
}
- if (params.isSetTracking_url()) {
- trackingUrl = params.tracking_url;
+ if (params.isSetTrackingUrl()) {
+ trackingUrl = params.getTrackingUrl();
}
- if (params.isSetExport_files()) {
- updateExportFiles(params.export_files);
+ if (params.isSetExportFiles()) {
+ updateExportFiles(params.getExportFiles());
}
if (params.isSetCommitInfos()) {
updateCommitInfos(params.getCommitInfos());
}
- profileDoneSignal.markedCountDown(params.getFragment_instance_id(), -1L);
+ profileDoneSignal.markedCountDown(params.getFragmentInstanceId(), -1L);
}
- if (params.isSetLoaded_rows()) {
+ if (params.isSetLoadedRows()) {
Catalog.getCurrentCatalog().getLoadManager().updateJobPrgress(
jobId, params.backend_id, params.query_id, params.fragment_instance_id, params.loaded_rows,
params.done);
@@ -1524,7 +1524,7 @@ public class Coordinator {
}
private TUniqueId fragmentInstanceId() {
- return this.rpcParams.params.getFragment_instance_id();
+ return this.rpcParams.params.getFragmentInstanceId();
}
}
@@ -1550,36 +1550,36 @@ public class Coordinator {
for (int i = 0; i < instanceExecParams.size(); ++i) {
final FInstanceExecParam instanceExecParam = instanceExecParams.get(i);
TExecPlanFragmentParams params = new TExecPlanFragmentParams();
- params.setProtocol_version(PaloInternalServiceVersion.V1);
+ params.setProtocolVersion(PaloInternalServiceVersion.V1);
params.setFragment(fragment.toThrift());
- params.setDesc_tbl(descTable);
+ params.setDescTbl(descTable);
params.setParams(new TPlanFragmentExecParams());
- params.setResource_info(tResourceInfo);
- params.params.setQuery_id(queryId);
- params.params.setFragment_instance_id(instanceExecParam.instanceId);
+ params.setResourceInfo(tResourceInfo);
+ params.params.setQueryId(queryId);
+ params.params.setFragmentInstanceId(instanceExecParam.instanceId);
Map<Integer, List<TScanRangeParams>> scanRanges = instanceExecParam.perNodeScanRanges;
if (scanRanges == null) {
scanRanges = Maps.newHashMap();
}
- params.params.setPer_node_scan_ranges(scanRanges);
- params.params.setPer_exch_num_senders(perExchNumSenders);
+ params.params.setPerNodeScanRanges(scanRanges);
+ params.params.setPerExchNumSenders(perExchNumSenders);
params.params.setDestinations(destinations);
- params.params.setSender_id(i);
- params.params.setNum_senders(instanceExecParams.size());
+ params.params.setSenderId(i);
+ params.params.setNumSenders(instanceExecParams.size());
params.setCoord(coordAddress);
- params.setBackend_num(backendNum++);
- params.setQuery_globals(queryGlobals);
- params.setQuery_options(queryOptions);
- params.params.setSend_query_statistics_with_every_batch(
+ params.setBackendNum(backendNum++);
+ params.setQueryGlobals(queryGlobals);
+ params.setQueryOptions(queryOptions);
+ params.params.setSendQueryStatisticsWithEveryBatch(
fragment.isTransferQueryStatisticsWithEveryBatch());
- if (queryOptions.getQuery_type() == TQueryType.LOAD) {
+ if (queryOptions.getQueryType() == TQueryType.LOAD) {
LoadErrorHub.Param param = Catalog.getCurrentCatalog().getLoadInstance().getLoadErrorHubInfo();
if (param != null) {
TLoadErrorHubInfo info = param.toThrift();
if (info != null) {
- params.setLoad_error_hub_info(info);
+ params.setLoadErrorHubInfo(info);
}
}
}
@@ -1595,18 +1595,18 @@ public class Coordinator {
sb.append("range=[");
int idx = 0;
for (TScanRangeParams range : params) {
- TPaloScanRange paloScanRange = range.getScan_range().getPalo_scan_range();
+ TPaloScanRange paloScanRange = range.getScanRange().getPaloScanRange();
if (paloScanRange != null) {
if (idx++ != 0) {
sb.append(",");
}
- sb.append("{tid=").append(paloScanRange.getTablet_id())
+ sb.append("{tid=").append(paloScanRange.getTabletId())
.append(",ver=").append(paloScanRange.getVersion()).append("}");
}
- TEsScanRange esScanRange = range.getScan_range().getEs_scan_range();
+ TEsScanRange esScanRange = range.getScanRange().getEsScanRange();
if (esScanRange != null) {
sb.append("{ index=").append(esScanRange.getIndex())
- .append(", shardid=").append(esScanRange.getShard_id())
+ .append(", shardid=").append(esScanRange.getShardId())
.append("}");
}
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/MasterOpExecutor.java b/fe/fe-core/src/main/java/org/apache/doris/qe/MasterOpExecutor.java
index 4d0aa0c..a9e5029 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/qe/MasterOpExecutor.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/qe/MasterOpExecutor.java
@@ -80,17 +80,17 @@ public class MasterOpExecutor {
params.setDb(ctx.getDatabase());
params.setSqlMode(ctx.getSessionVariable().getSqlMode());
params.setResourceInfo(ctx.toResourceCtx());
- params.setUser_ip(ctx.getRemoteIP());
- params.setTime_zone(ctx.getSessionVariable().getTimeZone());
- params.setStmt_id(ctx.getStmtId());
+ params.setUserIp(ctx.getRemoteIP());
+ params.setTimeZone(ctx.getSessionVariable().getTimeZone());
+ params.setStmtId(ctx.getStmtId());
params.setEnableStrictMode(ctx.getSessionVariable().getEnableInsertStrict());
- params.setCurrent_user_ident(ctx.getCurrentUserIdentity().toThrift());
+ params.setCurrentUserIdent(ctx.getCurrentUserIdentity().toThrift());
TQueryOptions queryOptions = new TQueryOptions();
- queryOptions.setMem_limit(ctx.getSessionVariable().getMaxExecMemByte());
- queryOptions.setQuery_timeout(ctx.getSessionVariable().getQueryTimeoutS());
- queryOptions.setLoad_mem_limit(ctx.getSessionVariable().getLoadMemLimit());
- params.setQuery_options(queryOptions);
+ queryOptions.setMemLimit(ctx.getSessionVariable().getMaxExecMemByte());
+ queryOptions.setQueryTimeout(ctx.getSessionVariable().getQueryTimeoutS());
+ queryOptions.setLoadMemLimit(ctx.getSessionVariable().getLoadMemLimit());
+ params.setQueryOptions(queryOptions);
LOG.info("Forward statement {} to Master {}", ctx.getStmtId(), thriftAddress);
diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java b/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java
index 06114ad..7f6831d 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/qe/SessionVariable.java
@@ -513,29 +513,29 @@ public class SessionVariable implements Serializable, Writable {
// used for rest api
public TQueryOptions toThrift() {
TQueryOptions tResult = new TQueryOptions();
- tResult.setMem_limit(maxExecMemByte);
+ tResult.setMemLimit(maxExecMemByte);
// TODO chenhao, reservation will be calculated by cost
- tResult.setMin_reservation(0);
- tResult.setMax_reservation(maxExecMemByte);
- tResult.setInitial_reservation_total_claims(maxExecMemByte);
- tResult.setBuffer_pool_limit(maxExecMemByte);
+ tResult.setMinReservation(0);
+ tResult.setMaxReservation(maxExecMemByte);
+ tResult.setInitialReservationTotalClaims(maxExecMemByte);
+ tResult.setBufferPoolLimit(maxExecMemByte);
- tResult.setQuery_timeout(queryTimeoutS);
- tResult.setIs_report_success(isReportSucc);
- tResult.setCodegen_level(codegenLevel);
+ tResult.setQueryTimeout(queryTimeoutS);
+ tResult.setIsReportSuccess(isReportSucc);
+ tResult.setCodegenLevel(codegenLevel);
- tResult.setBatch_size(batchSize);
- tResult.setDisable_stream_preaggregations(disableStreamPreaggregations);
- tResult.setLoad_mem_limit(loadMemLimit);
+ tResult.setBatchSize(batchSize);
+ tResult.setDisableStreamPreaggregations(disableStreamPreaggregations);
+ tResult.setLoadMemLimit(loadMemLimit);
if (maxScanKeyNum > -1) {
- tResult.setMax_scan_key_num(maxScanKeyNum);
+ tResult.setMaxScanKeyNum(maxScanKeyNum);
}
if (maxPushdownConditionsPerColumn > -1) {
- tResult.setMax_pushdown_conditions_per_column(maxPushdownConditionsPerColumn);
+ tResult.setMaxPushdownConditionsPerColumn(maxPushdownConditionsPerColumn);
}
- tResult.setEnable_spilling(enableSpilling);
+ tResult.setEnableSpilling(enableSpilling);
return tResult;
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/qe/cache/CacheProxy.java b/fe/fe-core/src/main/java/org/apache/doris/qe/cache/CacheProxy.java
index 4dedb16..535a042 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/qe/cache/CacheProxy.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/qe/cache/CacheProxy.java
@@ -95,8 +95,8 @@ public abstract class CacheProxy {
resultBatch.addToRows(ByteBuffer.wrap(one));
}
RowBatch batch = new RowBatch();
- resultBatch.setPacket_seq(1);
- resultBatch.setIs_compressed(false);
+ resultBatch.setPacketSeq(1);
+ resultBatch.setIsCompressed(false);
batch.setBatch(resultBatch);
batch.setEos(true);
return batch;
diff --git a/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java b/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java
index c782782..b854934 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/service/FrontendServiceImpl.java
@@ -157,7 +157,7 @@ public class FrontendServiceImpl implements FrontendService.Iface {
LOG.debug("get db names: {}", dbNames);
UserIdentity currentUser = null;
- if (params.isSetCurrent_user_ident()) {
+ if (params.isSetCurrentUserIdent()) {
currentUser = UserIdentity.fromThrift(params.current_user_ident);
} else {
currentUser = UserIdentity.createAnalyzedUserIdentWithIp(params.user, params.user_ip);
@@ -198,7 +198,7 @@ public class FrontendServiceImpl implements FrontendService.Iface {
Database db = Catalog.getCurrentCatalog().getDb(params.db);
UserIdentity currentUser = null;
- if (params.isSetCurrent_user_ident()) {
+ if (params.isSetCurrentUserIdent()) {
currentUser = UserIdentity.fromThrift(params.current_user_ident);
} else {
currentUser = UserIdentity.createAnalyzedUserIdentWithIp(params.user, params.user_ip);
@@ -240,7 +240,7 @@ public class FrontendServiceImpl implements FrontendService.Iface {
Database db = Catalog.getCurrentCatalog().getDb(params.db);
UserIdentity currentUser = null;
- if (params.isSetCurrent_user_ident()) {
+ if (params.isSetCurrentUserIdent()) {
currentUser = UserIdentity.fromThrift(params.current_user_ident);
} else {
currentUser = UserIdentity.createAnalyzedUserIdentWithIp(params.user, params.user_ip);
@@ -262,8 +262,8 @@ public class FrontendServiceImpl implements FrontendService.Iface {
status.setType(table.getMysqlType());
status.setEngine(table.getEngine());
status.setComment(table.getComment());
- status.setCreate_time(table.getCreateTime());
- status.setLast_check_time(table.getLastCheckTime());
+ status.setCreateTime(table.getCreateTime());
+ status.setLastCheckTime(table.getLastCheckTime());
tablesResult.add(status);
}
@@ -291,13 +291,13 @@ public class FrontendServiceImpl implements FrontendService.Iface {
// database privs should be checked in analysis phrase
UserIdentity currentUser = null;
- if (params.isSetCurrent_user_ident()) {
+ if (params.isSetCurrentUserIdent()) {
currentUser = UserIdentity.fromThrift(params.current_user_ident);
} else {
currentUser = UserIdentity.createAnalyzedUserIdentWithIp(params.user, params.user_ip);
}
if (!Catalog.getCurrentCatalog().getAuth().checkTblPriv(currentUser, params.db,
- params.getTable_name(), PrivPredicate.SHOW)) {
+ params.getTableName(), PrivPredicate.SHOW)) {
return result;
}
@@ -305,7 +305,7 @@ public class FrontendServiceImpl implements FrontendService.Iface {
if (db != null) {
db.readLock();
try {
- Table table = db.getTable(params.getTable_name());
+ Table table = db.getTable(params.getTableName());
if (table != null) {
for (Column column : table.getBaseSchema()) {
final TColumnDesc desc = new TColumnDesc(column.getName(), column.getDataType().toThrift());
@@ -409,12 +409,12 @@ public class FrontendServiceImpl implements FrontendService.Iface {
}
} catch (UserException e) {
LOG.warn("add mini load error: {}", e.getMessage());
- status.setStatus_code(TStatusCode.ANALYSIS_ERROR);
- status.addToError_msgs(e.getMessage());
+ status.setStatusCode(TStatusCode.ANALYSIS_ERROR);
+ status.addToErrorMsgs(e.getMessage());
} catch (Throwable e) {
LOG.warn("unexpected exception when adding mini load", e);
- status.setStatus_code(TStatusCode.ANALYSIS_ERROR);
- status.addToError_msgs(Strings.nullToEmpty(e.getMessage()));
+ status.setStatusCode(TStatusCode.ANALYSIS_ERROR);
+ status.addToErrorMsgs(Strings.nullToEmpty(e.getMessage()));
} finally {
ConnectContext.remove();
}
@@ -479,8 +479,8 @@ public class FrontendServiceImpl implements FrontendService.Iface {
if (job == null) {
String failMsg = "job does not exist. id: " + jobId;
LOG.warn(failMsg);
- status.setStatus_code(TStatusCode.CANCELLED);
- status.addToError_msgs(failMsg);
+ status.setStatusCode(TStatusCode.CANCELLED);
+ status.addToErrorMsgs(failMsg);
return result;
}
@@ -488,8 +488,8 @@ public class FrontendServiceImpl implements FrontendService.Iface {
if (taskInfo == null) {
String failMsg = "task info does not exist. task id: " + taskId + ", job id: " + jobId;
LOG.warn(failMsg);
- status.setStatus_code(TStatusCode.CANCELLED);
- status.addToError_msgs(failMsg);
+ status.setStatusCode(TStatusCode.CANCELLED);
+ status.addToErrorMsgs(failMsg);
return result;
}
@@ -497,15 +497,15 @@ public class FrontendServiceImpl implements FrontendService.Iface {
TMiniLoadEtlStatusResult statusResult = request.getEtlTaskStatus();
LOG.info("load job id: {}, etl task id: {}, status: {}", jobId, taskId, statusResult);
EtlStatus taskStatus = taskInfo.getTaskStatus();
- if (taskStatus.setState(statusResult.getEtl_state())) {
+ if (taskStatus.setState(statusResult.getEtlState())) {
if (statusResult.isSetCounters()) {
taskStatus.setCounters(statusResult.getCounters());
}
- if (statusResult.isSetTracking_url()) {
- taskStatus.setTrackingUrl(statusResult.getTracking_url());
+ if (statusResult.isSetTrackingUrl()) {
+ taskStatus.setTrackingUrl(statusResult.getTrackingUrl());
}
- if (statusResult.isSetFile_map()) {
- taskStatus.setFileMap(statusResult.getFile_map());
+ if (statusResult.isSetFileMap()) {
+ taskStatus.setFileMap(statusResult.getFileMap());
}
}
return result;
@@ -514,7 +514,7 @@ public class FrontendServiceImpl implements FrontendService.Iface {
@Override
public TMiniLoadBeginResult miniLoadBegin(TMiniLoadBeginRequest request) throws TException {
LOG.info("receive mini load begin request. label: {}, user: {}, ip: {}",
- request.getLabel(), request.getUser(), request.getUser_ip());
+ request.getLabel(), request.getUser(), request.getUserIp());
TMiniLoadBeginResult result = new TMiniLoadBeginResult();
TStatus status = new TStatus(TStatusCode.OK);
@@ -526,23 +526,23 @@ public class FrontendServiceImpl implements FrontendService.Iface {
}
// step1: check password and privs
checkPasswordAndPrivs(cluster, request.getUser(), request.getPasswd(), request.getDb(),
- request.getTbl(), request.getUser_ip(), PrivPredicate.LOAD);
+ request.getTbl(), request.getUserIp(), PrivPredicate.LOAD);
// step2: check label and record metadata in load manager
- if (request.isSetSub_label()) {
+ if (request.isSetSubLabel()) {
// TODO(ml): multi mini load
} else {
// add load metadata in loadManager
- result.setTxn_id(Catalog.getCurrentCatalog().getLoadManager().createLoadJobFromMiniLoad(request));
+ result.setTxnId(Catalog.getCurrentCatalog().getLoadManager().createLoadJobFromMiniLoad(request));
}
return result;
} catch (UserException e) {
- status.setStatus_code(TStatusCode.ANALYSIS_ERROR);
- status.addToError_msgs(e.getMessage());
+ status.setStatusCode(TStatusCode.ANALYSIS_ERROR);
+ status.addToErrorMsgs(e.getMessage());
return result;
} catch (Throwable e) {
LOG.warn("catch unknown result.", e);
- status.setStatus_code(TStatusCode.INTERNAL_ERROR);
- status.addToError_msgs(Strings.nullToEmpty(e.getMessage()));
+ status.setStatusCode(TStatusCode.INTERNAL_ERROR);
+ status.addToErrorMsgs(Strings.nullToEmpty(e.getMessage()));
return result;
}
}
@@ -551,11 +551,11 @@ public class FrontendServiceImpl implements FrontendService.Iface {
public TFeResult isMethodSupported(TIsMethodSupportedRequest request) throws TException {
TStatus status = new TStatus(TStatusCode.OK);
TFeResult result = new TFeResult(FrontendServiceVersion.V1, status);
- switch (request.getFunction_name()){
+ switch (request.getFunctionName()){
case "STREAMING_MINI_LOAD":
break;
default:
- status.setStatus_code(NOT_IMPLEMENTED_ERROR);
+ status.setStatusCode(NOT_IMPLEMENTED_ERROR);
break;
}
return result;
@@ -573,7 +573,7 @@ public class FrontendServiceImpl implements FrontendService.Iface {
}
// add this log so that we can track this stmt
- LOG.info("receive forwarded stmt {} from FE: {}", params.getStmt_id(), clientAddr.getHostname());
+ LOG.info("receive forwarded stmt {} from FE: {}", params.getStmtId(), clientAddr.getHostname());
ConnectContext context = new ConnectContext(null);
ConnectProcessor processor = new ConnectProcessor(context);
TMasterOpResult result = processor.proxyExecute(params);
@@ -601,7 +601,7 @@ public class FrontendServiceImpl implements FrontendService.Iface {
@Override
public TFeResult loadCheck(TLoadCheckRequest request) throws TException {
LOG.info("receive load check request. label: {}, user: {}, ip: {}",
- request.getLabel(), request.getUser(), request.getUser_ip());
+ request.getLabel(), request.getUser(), request.getUserIp());
TStatus status = new TStatus(TStatusCode.OK);
TFeResult result = new TFeResult(FrontendServiceVersion.V1, status);
@@ -612,15 +612,15 @@ public class FrontendServiceImpl implements FrontendService.Iface {
}
checkPasswordAndPrivs(cluster, request.getUser(), request.getPasswd(), request.getDb(),
- request.getTbl(), request.getUser_ip(), PrivPredicate.LOAD);
+ request.getTbl(), request.getUserIp(), PrivPredicate.LOAD);
} catch (UserException e) {
- status.setStatus_code(TStatusCode.ANALYSIS_ERROR);
- status.addToError_msgs(e.getMessage());
+ status.setStatusCode(TStatusCode.ANALYSIS_ERROR);
+ status.addToErrorMsgs(e.getMessage());
return result;
} catch (Throwable e) {
LOG.warn("catch unknown result.", e);
- status.setStatus_code(TStatusCode.INTERNAL_ERROR);
- status.addToError_msgs(Strings.nullToEmpty(e.getMessage()));
+ status.setStatusCode(TStatusCode.INTERNAL_ERROR);
+ status.addToErrorMsgs(Strings.nullToEmpty(e.getMessage()));
return result;
}
@@ -644,17 +644,17 @@ public class FrontendServiceImpl implements FrontendService.Iface {
LOG.info("duplicate request for stream load. request id: {}, txn: {}", e.getDuplicatedRequestId(), e.getTxnId());
result.setTxnId(e.getTxnId());
} catch (LabelAlreadyUsedException e) {
- status.setStatus_code(TStatusCode.LABEL_ALREADY_EXISTS);
- status.addToError_msgs(e.getMessage());
- result.setJob_status(e.getJobStatus());
+ status.setStatusCode(TStatusCode.LABEL_ALREADY_EXISTS);
+ status.addToErrorMsgs(e.getMessage());
+ result.setJobStatus(e.getJobStatus());
} catch (UserException e) {
LOG.warn("failed to begin: {}", e.getMessage());
- status.setStatus_code(TStatusCode.ANALYSIS_ERROR);
- status.addToError_msgs(e.getMessage());
+ status.setStatusCode(TStatusCode.ANALYSIS_ERROR);
+ status.addToErrorMsgs(e.getMessage());
} catch (Throwable e) {
LOG.warn("catch unknown result.", e);
- status.setStatus_code(TStatusCode.INTERNAL_ERROR);
- status.addToError_msgs(Strings.nullToEmpty(e.getMessage()));
+ status.setStatusCode(TStatusCode.INTERNAL_ERROR);
+ status.addToErrorMsgs(Strings.nullToEmpty(e.getMessage()));
return result;
}
return result;
@@ -667,7 +667,7 @@ public class FrontendServiceImpl implements FrontendService.Iface {
}
checkPasswordAndPrivs(cluster, request.getUser(), request.getPasswd(), request.getDb(),
- request.getTbl(), request.getUser_ip(), PrivPredicate.LOAD);
+ request.getTbl(), request.getUserIp(), PrivPredicate.LOAD);
// check label
if (Strings.isNullOrEmpty(request.getLabel())) {
@@ -700,7 +700,7 @@ public class FrontendServiceImpl implements FrontendService.Iface {
long timeoutSecond = request.isSetTimeout() ? request.getTimeout() : Config.stream_load_default_timeout_second;
MetricRepo.COUNTER_LOAD_ADD.increase(1L);
return Catalog.getCurrentGlobalTransactionMgr().beginTransaction(
- db.getId(), Lists.newArrayList(table.getId()), request.getLabel(), request.getRequest_id(),
+ db.getId(), Lists.newArrayList(table.getId()), request.getLabel(), request.getRequestId(),
new TxnCoordinator(TxnSourceType.BE, clientIp),
TransactionState.LoadJobSourceType.BACKEND_STREAMING, -1, timeoutSecond);
}
@@ -718,17 +718,17 @@ public class FrontendServiceImpl implements FrontendService.Iface {
try {
if (!loadTxnCommitImpl(request)) {
// committed success but not visible
- status.setStatus_code(TStatusCode.PUBLISH_TIMEOUT);
- status.addToError_msgs("transaction commit successfully, BUT data will be visible later");
+ status.setStatusCode(TStatusCode.PUBLISH_TIMEOUT);
+ status.addToErrorMsgs("transaction commit successfully, BUT data will be visible later");
}
} catch (UserException e) {
LOG.warn("failed to commit txn: {}: {}", request.getTxnId(), e.getMessage());
- status.setStatus_code(TStatusCode.ANALYSIS_ERROR);
- status.addToError_msgs(e.getMessage());
+ status.setStatusCode(TStatusCode.ANALYSIS_ERROR);
+ status.addToErrorMsgs(e.getMessage());
} catch (Throwable e) {
LOG.warn("catch unknown result.", e);
- status.setStatus_code(TStatusCode.INTERNAL_ERROR);
- status.addToError_msgs(Strings.nullToEmpty(e.getMessage()));
+ status.setStatusCode(TStatusCode.INTERNAL_ERROR);
+ status.addToErrorMsgs(Strings.nullToEmpty(e.getMessage()));
return result;
}
return result;
@@ -741,11 +741,11 @@ public class FrontendServiceImpl implements FrontendService.Iface {
cluster = SystemInfoService.DEFAULT_CLUSTER;
}
- if (request.isSetAuth_code()) {
+ if (request.isSetAuthCode()) {
// TODO(cmy): find a way to check
} else {
checkPasswordAndPrivs(cluster, request.getUser(), request.getPasswd(), request.getDb(),
- request.getTbl(), request.getUser_ip(), PrivPredicate.LOAD);
+ request.getTbl(), request.getUserIp(), PrivPredicate.LOAD);
}
// get database
@@ -759,7 +759,7 @@ public class FrontendServiceImpl implements FrontendService.Iface {
}
throw new UserException("unknown database, database=" + dbName);
}
- long timeoutMs = request.isSetThrift_rpc_timeout_ms() ? request.getThrift_rpc_timeout_ms() : 5000;
+ long timeoutMs = request.isSetThriftRpcTimeoutMs() ? request.getThriftRpcTimeoutMs() : 5000;
boolean ret = Catalog.getCurrentGlobalTransactionMgr().commitAndPublishTransaction(
db, request.getTxnId(),
TabletCommitInfo.fromThrift(request.getCommitInfos()),
@@ -785,12 +785,12 @@ public class FrontendServiceImpl implements FrontendService.Iface {
loadTxnRollbackImpl(request);
} catch (UserException e) {
LOG.warn("failed to rollback txn {}: {}", request.getTxnId(), e.getMessage());
- status.setStatus_code(TStatusCode.ANALYSIS_ERROR);
- status.addToError_msgs(e.getMessage());
+ status.setStatusCode(TStatusCode.ANALYSIS_ERROR);
+ status.addToErrorMsgs(e.getMessage());
} catch (Throwable e) {
LOG.warn("catch unknown result.", e);
- status.setStatus_code(TStatusCode.INTERNAL_ERROR);
- status.addToError_msgs(Strings.nullToEmpty(e.getMessage()));
+ status.setStatusCode(TStatusCode.INTERNAL_ERROR);
+ status.addToErrorMsgs(Strings.nullToEmpty(e.getMessage()));
return result;
}
@@ -803,11 +803,11 @@ public class FrontendServiceImpl implements FrontendService.Iface {
cluster = SystemInfoService.DEFAULT_CLUSTER;
}
- if (request.isSetAuth_code()) {
+ if (request.isSetAuthCode()) {
// TODO(cmy): find a way to check
} else {
checkPasswordAndPrivs(cluster, request.getUser(), request.getPasswd(), request.getDb(),
- request.getTbl(), request.getUser_ip(), PrivPredicate.LOAD);
+ request.getTbl(), request.getUserIp(), PrivPredicate.LOAD);
}
String dbName = ClusterNamespace.getFullName(cluster, request.getDb());
Database db = Catalog.getCurrentCatalog().getDb(dbName);
@@ -835,12 +835,12 @@ public class FrontendServiceImpl implements FrontendService.Iface {
result.setParams(streamLoadPutImpl(request));
} catch (UserException e) {
LOG.warn("failed to get stream load plan: {}", e.getMessage());
- status.setStatus_code(TStatusCode.ANALYSIS_ERROR);
- status.addToError_msgs(e.getMessage());
+ status.setStatusCode(TStatusCode.ANALYSIS_ERROR);
+ status.addToErrorMsgs(e.getMessage());
} catch (Throwable e) {
LOG.warn("catch unknown result.", e);
- status.setStatus_code(TStatusCode.INTERNAL_ERROR);
- status.addToError_msgs(Strings.nullToEmpty(e.getMessage()));
+ status.setStatusCode(TStatusCode.INTERNAL_ERROR);
+ status.addToErrorMsgs(Strings.nullToEmpty(e.getMessage()));
return result;
}
return result;
@@ -862,7 +862,7 @@ public class FrontendServiceImpl implements FrontendService.Iface {
}
throw new UserException("unknown database, database=" + dbName);
}
- long timeoutMs = request.isSetThrift_rpc_timeout_ms() ? request.getThrift_rpc_timeout_ms() : 5000;
+ long timeoutMs = request.isSetThriftRpcTimeoutMs() ? request.getThriftRpcTimeoutMs() : 5000;
if (!db.tryReadLock(timeoutMs, TimeUnit.MILLISECONDS)) {
throw new UserException("get database read lock timeout, database=" + fullDbName);
}
@@ -892,8 +892,8 @@ public class FrontendServiceImpl implements FrontendService.Iface {
@Override
public TStatus snapshotLoaderReport(TSnapshotLoaderReportRequest request) throws TException {
- if (Catalog.getCurrentCatalog().getBackupHandler().report(request.getTask_type(), request.getJob_id(),
- request.getTask_id(), request.getFinished_num(), request.getTotal_num())) {
+ if (Catalog.getCurrentCatalog().getBackupHandler().report(request.getTaskType(), request.getJobId(),
+ request.getTaskId(), request.getFinishedNum(), request.getTotalNum())) {
return new TStatus(TStatusCode.OK);
}
return new TStatus(TStatusCode.CANCELLED);
diff --git a/fe/fe-core/src/main/java/org/apache/doris/system/Backend.java b/fe/fe-core/src/main/java/org/apache/doris/system/Backend.java
index 4441025..1d735ee 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/system/Backend.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/system/Backend.java
@@ -417,10 +417,10 @@ public class Backend implements Writable {
*/
boolean isChanged = false;
for (TDisk tDisk : backendDisks.values()) {
- String rootPath = tDisk.getRoot_path();
- long totalCapacityB = tDisk.getDisk_total_capacity();
- long dataUsedCapacityB = tDisk.getData_used_capacity();
- long diskAvailableCapacityB = tDisk.getDisk_available_capacity();
+ String rootPath = tDisk.getRootPath();
+ long totalCapacityB = tDisk.getDiskTotalCapacity();
+ long dataUsedCapacityB = tDisk.getDataUsedCapacity();
+ long diskAvailableCapacityB = tDisk.getDiskAvailableCapacity();
boolean isUsed = tDisk.isUsed();
DiskInfo diskInfo = disks.get(rootPath);
@@ -435,12 +435,12 @@ public class Backend implements Writable {
diskInfo.setTotalCapacityB(totalCapacityB);
diskInfo.setDataUsedCapacityB(dataUsedCapacityB);
diskInfo.setAvailableCapacityB(diskAvailableCapacityB);
- if (tDisk.isSetPath_hash()) {
- diskInfo.setPathHash(tDisk.getPath_hash());
+ if (tDisk.isSetPathHash()) {
+ diskInfo.setPathHash(tDisk.getPathHash());
}
- if (tDisk.isSetStorage_medium()) {
- diskInfo.setStorageMedium(tDisk.getStorage_medium());
+ if (tDisk.isSetStorageMedium()) {
+ diskInfo.setStorageMedium(tDisk.getStorageMedium());
}
if (isUsed) {
diff --git a/fe/fe-core/src/main/java/org/apache/doris/system/HeartbeatMgr.java b/fe/fe-core/src/main/java/org/apache/doris/system/HeartbeatMgr.java
index 7948c63..c87096e 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/system/HeartbeatMgr.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/system/HeartbeatMgr.java
@@ -82,9 +82,9 @@ public class HeartbeatMgr extends MasterDaemon {
TMasterInfo tMasterInfo = new TMasterInfo(
new TNetworkAddress(FrontendOptions.getLocalHostAddress(), Config.rpc_port), clusterId, epoch);
tMasterInfo.setToken(token);
- tMasterInfo.setHttp_port(Config.http_port);
+ tMasterInfo.setHttpPort(Config.http_port);
long flags = heartbeatFlags.getHeartbeatFlags();
- tMasterInfo.setHeartbeat_flags(flags);
+ tMasterInfo.setHeartbeatFlags(flags);
masterInfo.set(tMasterInfo);
}
@@ -107,7 +107,7 @@ public class HeartbeatMgr extends MasterDaemon {
List<Frontend> frontends = Catalog.getCurrentCatalog().getFrontends(null);
String masterFeNodeName = "";
for (Frontend frontend : frontends) {
- if (frontend.getHost().equals(masterInfo.get().getNetwork_address().getHostname())) {
+ if (frontend.getHost().equals(masterInfo.get().getNetworkAddress().getHostname())) {
masterFeNodeName = frontend.getNodeName();
}
FrontendHeartbeatHandler handler = new FrontendHeartbeatHandler(frontend,
@@ -122,7 +122,7 @@ public class HeartbeatMgr extends MasterDaemon {
for (Map.Entry<String, List<FsBroker>> entry : brokerMap.entrySet()) {
for (FsBroker brokerAddress : entry.getValue()) {
BrokerHeartbeatHandler handler = new BrokerHeartbeatHandler(entry.getKey(), brokerAddress,
- masterInfo.get().getNetwork_address().getHostname());
+ masterInfo.get().getNetworkAddress().getHostname());
hbResponses.add(executor.submit(handler));
}
}
@@ -223,20 +223,20 @@ public class HeartbeatMgr extends MasterDaemon {
client = ClientPool.heartbeatPool.borrowObject(beAddr);
TMasterInfo copiedMasterInfo = new TMasterInfo(masterInfo.get());
- copiedMasterInfo.setBackend_ip(backend.getHost());
+ copiedMasterInfo.setBackendIp(backend.getHost());
long flags = heartbeatFlags.getHeartbeatFlags();
- copiedMasterInfo.setHeartbeat_flags(flags);
- copiedMasterInfo.setBackend_id(backendId);
+ copiedMasterInfo.setHeartbeatFlags(flags);
+ copiedMasterInfo.setBackendId(backendId);
THeartbeatResult result = client.heartbeat(copiedMasterInfo);
ok = true;
- if (result.getStatus().getStatus_code() == TStatusCode.OK) {
- TBackendInfo tBackendInfo = result.getBackend_info();
- int bePort = tBackendInfo.getBe_port();
- int httpPort = tBackendInfo.getHttp_port();
+ if (result.getStatus().getStatusCode() == TStatusCode.OK) {
+ TBackendInfo tBackendInfo = result.getBackendInfo();
+ int bePort = tBackendInfo.getBePort();
+ int httpPort = tBackendInfo.getHttpPort();
int brpcPort = -1;
- if (tBackendInfo.isSetBrpc_port()) {
- brpcPort = tBackendInfo.getBrpc_port();
+ if (tBackendInfo.isSetBrpcPort()) {
+ brpcPort = tBackendInfo.getBrpcPort();
}
String version = "";
if (tBackendInfo.isSetVersion()) {
@@ -246,8 +246,8 @@ public class HeartbeatMgr extends MasterDaemon {
// backend.updateOnce(bePort, httpPort, beRpcPort, brpcPort);
return new BackendHbResponse(backendId, bePort, httpPort, brpcPort, System.currentTimeMillis(), version);
} else {
- return new BackendHbResponse(backendId, result.getStatus().getError_msgs().isEmpty() ? "Unknown error"
- : result.getStatus().getError_msgs().get(0));
+ return new BackendHbResponse(backendId, result.getStatus().getErrorMsgs().isEmpty() ? "Unknown error"
+ : result.getStatus().getErrorMsgs().get(0));
}
} catch (Exception e) {
LOG.warn("backend heartbeat got exception", e);
diff --git a/fe/fe-core/src/main/java/org/apache/doris/task/AgentBatchTask.java b/fe/fe-core/src/main/java/org/apache/doris/task/AgentBatchTask.java
index 9bff8ed..36ca398 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/task/AgentBatchTask.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/task/AgentBatchTask.java
@@ -163,7 +163,7 @@ public class AgentBatchTask implements Runnable {
for (AgentTask task : tasks) {
agentTaskRequests.add(toAgentTaskRequest(task));
}
- client.submit_tasks(agentTaskRequests);
+ client.submitTasks(agentTaskRequests);
if (LOG.isDebugEnabled()) {
for (AgentTask task : tasks) {
LOG.debug("send task: type[{}], backend[{}], signature[{}]",
@@ -185,11 +185,11 @@ public class AgentBatchTask implements Runnable {
private TAgentTaskRequest toAgentTaskRequest(AgentTask task) {
TAgentTaskRequest tAgentTaskRequest = new TAgentTaskRequest();
- tAgentTaskRequest.setProtocol_version(TAgentServiceVersion.V1);
+ tAgentTaskRequest.setProtocolVersion(TAgentServiceVersion.V1);
tAgentTaskRequest.setSignature(task.getSignature());
TTaskType taskType = task.getTaskType();
- tAgentTaskRequest.setTask_type(taskType);
+ tAgentTaskRequest.setTaskType(taskType);
switch (taskType) {
case CREATE: {
CreateReplicaTask createReplicaTask = (CreateReplicaTask) task;
@@ -197,7 +197,7 @@ public class AgentBatchTask implements Runnable {
if (LOG.isDebugEnabled()) {
LOG.debug(request.toString());
}
- tAgentTaskRequest.setCreate_tablet_req(request);
+ tAgentTaskRequest.setCreateTabletReq(request);
return tAgentTaskRequest;
}
case DROP: {
@@ -206,7 +206,7 @@ public class AgentBatchTask implements Runnable {
if (LOG.isDebugEnabled()) {
LOG.debug(request.toString());
}
- tAgentTaskRequest.setDrop_tablet_req(request);
+ tAgentTaskRequest.setDropTabletReq(request);
return tAgentTaskRequest;
}
case REALTIME_PUSH:
@@ -216,9 +216,9 @@ public class AgentBatchTask implements Runnable {
if (LOG.isDebugEnabled()) {
LOG.debug(request.toString());
}
- tAgentTaskRequest.setPush_req(request);
+ tAgentTaskRequest.setPushReq(request);
if (pushTask.getPushType() == TPushType.LOAD || pushTask.getPushType() == TPushType.LOAD_DELETE) {
- tAgentTaskRequest.setResource_info(pushTask.getResourceInfo());
+ tAgentTaskRequest.setResourceInfo(pushTask.getResourceInfo());
}
tAgentTaskRequest.setPriority(pushTask.getPriority());
return tAgentTaskRequest;
@@ -229,7 +229,7 @@ public class AgentBatchTask implements Runnable {
if (LOG.isDebugEnabled()) {
LOG.debug(request.toString());
}
- tAgentTaskRequest.setClone_req(request);
+ tAgentTaskRequest.setCloneReq(request);
return tAgentTaskRequest;
}
case ROLLUP: {
@@ -238,8 +238,8 @@ public class AgentBatchTask implements Runnable {
if (LOG.isDebugEnabled()) {
LOG.debug(request.toString());
}
- tAgentTaskRequest.setAlter_tablet_req(request);
- tAgentTaskRequest.setResource_info(rollupTask.getResourceInfo());
+ tAgentTaskRequest.setAlterTabletReq(request);
+ tAgentTaskRequest.setResourceInfo(rollupTask.getResourceInfo());
return tAgentTaskRequest;
}
case SCHEMA_CHANGE: {
@@ -248,8 +248,8 @@ public class AgentBatchTask implements Runnable {
if (LOG.isDebugEnabled()) {
LOG.debug(request.toString());
}
- tAgentTaskRequest.setAlter_tablet_req(request);
- tAgentTaskRequest.setResource_info(schemaChangeTask.getResourceInfo());
+ tAgentTaskRequest.setAlterTabletReq(request);
+ tAgentTaskRequest.setResourceInfo(schemaChangeTask.getResourceInfo());
return tAgentTaskRequest;
}
case STORAGE_MEDIUM_MIGRATE: {
@@ -258,7 +258,7 @@ public class AgentBatchTask implements Runnable {
if (LOG.isDebugEnabled()) {
LOG.debug(request.toString());
}
- tAgentTaskRequest.setStorage_medium_migrate_req(request);
+ tAgentTaskRequest.setStorageMediumMigrateReq(request);
return tAgentTaskRequest;
}
case CHECK_CONSISTENCY: {
@@ -267,7 +267,7 @@ public class AgentBatchTask implements Runnable {
if (LOG.isDebugEnabled()) {
LOG.debug(request.toString());
}
- tAgentTaskRequest.setCheck_consistency_req(request);
+ tAgentTaskRequest.setCheckConsistencyReq(request);
return tAgentTaskRequest;
}
case MAKE_SNAPSHOT: {
@@ -276,7 +276,7 @@ public class AgentBatchTask implements Runnable {
if (LOG.isDebugEnabled()) {
LOG.debug(request.toString());
}
- tAgentTaskRequest.setSnapshot_req(request);
+ tAgentTaskRequest.setSnapshotReq(request);
return tAgentTaskRequest;
}
case RELEASE_SNAPSHOT: {
@@ -285,7 +285,7 @@ public class AgentBatchTask implements Runnable {
if (LOG.isDebugEnabled()) {
LOG.debug(request.toString());
}
- tAgentTaskRequest.setRelease_snapshot_req(request);
+ tAgentTaskRequest.setReleaseSnapshotReq(request);
return tAgentTaskRequest;
}
case UPLOAD: {
@@ -294,7 +294,7 @@ public class AgentBatchTask implements Runnable {
if (LOG.isDebugEnabled()) {
LOG.debug(request.toString());
}
- tAgentTaskRequest.setUpload_req(request);
+ tAgentTaskRequest.setUploadReq(request);
return tAgentTaskRequest;
}
case DOWNLOAD: {
@@ -303,7 +303,7 @@ public class AgentBatchTask implements Runnable {
if (LOG.isDebugEnabled()) {
LOG.debug(request.toString());
}
- tAgentTaskRequest.setDownload_req(request);
+ tAgentTaskRequest.setDownloadReq(request);
return tAgentTaskRequest;
}
case PUBLISH_VERSION: {
@@ -312,7 +312,7 @@ public class AgentBatchTask implements Runnable {
if (LOG.isDebugEnabled()) {
LOG.debug(request.toString());
}
- tAgentTaskRequest.setPublish_version_req(request);
+ tAgentTaskRequest.setPublishVersionReq(request);
return tAgentTaskRequest;
}
case CLEAR_ALTER_TASK: {
@@ -321,7 +321,7 @@ public class AgentBatchTask implements Runnable {
if (LOG.isDebugEnabled()) {
LOG.debug(request.toString());
}
- tAgentTaskRequest.setClear_alter_task_req(request);
+ tAgentTaskRequest.setClearAlterTaskReq(request);
return tAgentTaskRequest;
}
case CLEAR_TRANSACTION_TASK: {
@@ -330,7 +330,7 @@ public class AgentBatchTask implements Runnable {
if (LOG.isDebugEnabled()) {
LOG.debug(request.toString());
}
- tAgentTaskRequest.setClear_transaction_task_req(request);
+ tAgentTaskRequest.setClearTransactionTaskReq(request);
return tAgentTaskRequest;
}
case MOVE: {
@@ -339,7 +339,7 @@ public class AgentBatchTask implements Runnable {
if (LOG.isDebugEnabled()) {
LOG.debug(request.toString());
}
- tAgentTaskRequest.setMove_dir_req(request);
+ tAgentTaskRequest.setMoveDirReq(request);
return tAgentTaskRequest;
}
case UPDATE_TABLET_META_INFO: {
@@ -348,7 +348,7 @@ public class AgentBatchTask implements Runnable {
if (LOG.isDebugEnabled()) {
LOG.debug(request.toString());
}
- tAgentTaskRequest.setUpdate_tablet_meta_info_req(request);
+ tAgentTaskRequest.setUpdateTabletMetaInfoReq(request);
return tAgentTaskRequest;
}
case ALTER: {
@@ -357,7 +357,7 @@ public class AgentBatchTask implements Runnable {
if (LOG.isDebugEnabled()) {
LOG.debug(request.toString());
}
- tAgentTaskRequest.setAlter_tablet_req_v2(request);
+ tAgentTaskRequest.setAlterTabletReqV2(request);
return tAgentTaskRequest;
}
default:
diff --git a/fe/fe-core/src/main/java/org/apache/doris/task/AgentClient.java b/fe/fe-core/src/main/java/org/apache/doris/task/AgentClient.java
index dbb1717..a62cb0f 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/task/AgentClient.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/task/AgentClient.java
@@ -57,7 +57,7 @@ public class AgentClient {
try {
borrowClient();
// submit etl task
- result = client.submit_etl_task(request);
+ result = client.submitEtlTask(request);
ok = true;
} catch (Exception e) {
LOG.warn("submit etl task error", e);
@@ -73,7 +73,7 @@ public class AgentClient {
try {
borrowClient();
// submit make snapshot task
- result = client.make_snapshot(request);
+ result = client.makeSnapshot(request);
ok = true;
} catch (Exception e) {
LOG.warn("submit make snapshot error", e);
@@ -89,7 +89,7 @@ public class AgentClient {
try {
borrowClient();
// submit release snapshot task
- result = client.release_snapshot(snapshotPath);
+ result = client.releaseSnapshot(snapshotPath);
ok = true;
} catch (Exception e) {
LOG.warn("submit release snapshot error", e);
@@ -105,7 +105,7 @@ public class AgentClient {
try {
borrowClient();
// submit export task
- TStatus status = client.submit_export_task(request);
+ TStatus status = client.submitExportTask(request);
result = new Status(status);
} catch (Exception e) {
LOG.warn("submit export task error", e);
@@ -123,7 +123,7 @@ public class AgentClient {
try {
borrowClient();
// get etl status
- result = client.get_etl_status(request);
+ result = client.getEtlStatus(request);
ok = true;
} catch (Exception e) {
LOG.warn("get etl status error", e);
@@ -140,7 +140,7 @@ public class AgentClient {
try {
borrowClient();
// get export status
- result = client.get_export_status(request);
+ result = client.getExportStatus(request);
ok = true;
} catch (Exception e) {
LOG.warn("get export status error", e);
@@ -157,7 +157,7 @@ public class AgentClient {
try {
borrowClient();
// erase export task
- TStatus status = client.erase_export_task(request);
+ TStatus status = client.eraseExportTask(request);
result = new Status(status);
} catch (Exception e) {
LOG.warn("submit export task error", e);
@@ -174,7 +174,7 @@ public class AgentClient {
try {
borrowClient();
// delete etl files
- client.delete_etl_files(request);
+ client.deleteEtlFiles(request);
ok = true;
} catch (Exception e) {
LOG.warn("delete etl files error", e);
diff --git a/fe/fe-core/src/main/java/org/apache/doris/task/AlterReplicaTask.java b/fe/fe-core/src/main/java/org/apache/doris/task/AlterReplicaTask.java
index 5b82fe8..d2b0ff3 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/task/AlterReplicaTask.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/task/AlterReplicaTask.java
@@ -111,16 +111,16 @@ public class AlterReplicaTask extends AgentTask {
public TAlterTabletReqV2 toThrift() {
TAlterTabletReqV2 req = new TAlterTabletReqV2(baseTabletId, signature, baseSchemaHash, newSchemaHash);
- req.setAlter_version(version);
- req.setAlter_version_hash(versionHash);
+ req.setAlterVersion(version);
+ req.setAlterVersionHash(versionHash);
if (defineExprs != null) {
for (Map.Entry<String, Expr> entry : defineExprs.entrySet()) {
List<SlotRef> slots = Lists.newArrayList();
entry.getValue().collect(SlotRef.class, slots);
TAlterMaterializedViewParam mvParam = new TAlterMaterializedViewParam(entry.getKey());
- mvParam.setOrigin_column_name(slots.get(0).getColumnName());
- mvParam.setMv_expr(entry.getValue().treeToThrift());
- req.addToMaterialized_view_params(mvParam);
+ mvParam.setOriginColumnName(slots.get(0).getColumnName());
+ mvParam.setMvExpr(entry.getValue().treeToThrift());
+ req.addToMaterializedViewParams(mvParam);
}
}
return req;
diff --git a/fe/fe-core/src/main/java/org/apache/doris/task/CloneTask.java b/fe/fe-core/src/main/java/org/apache/doris/task/CloneTask.java
index b324378..6bb927a 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/task/CloneTask.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/task/CloneTask.java
@@ -83,15 +83,15 @@ public class CloneTask extends AgentTask {
public TCloneReq toThrift() {
TCloneReq request = new TCloneReq(tabletId, schemaHash, srcBackends);
- request.setStorage_medium(storageMedium);
- request.setCommitted_version(visibleVersion);
- request.setCommitted_version_hash(visibleVersionHash);
- request.setTask_version(taskVersion);
+ request.setStorageMedium(storageMedium);
+ request.setCommittedVersion(visibleVersion);
+ request.setCommittedVersionHash(visibleVersionHash);
+ request.setTaskVersion(taskVersion);
if (taskVersion == VERSION_2) {
- request.setSrc_path_hash(srcPathHash);
- request.setDest_path_hash(destPathHash);
+ request.setSrcPathHash(srcPathHash);
+ request.setDestPathHash(destPathHash);
}
- request.setTimeout_s(timeoutS);
+ request.setTimeoutS(timeoutS);
return request;
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/task/CreateReplicaTask.java b/fe/fe-core/src/main/java/org/apache/doris/task/CreateReplicaTask.java
index 62258c7..69a6f95 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/task/CreateReplicaTask.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/task/CreateReplicaTask.java
@@ -158,13 +158,13 @@ public class CreateReplicaTask extends AgentTask {
public TCreateTabletReq toThrift() {
TCreateTabletReq createTabletReq = new TCreateTabletReq();
- createTabletReq.setTablet_id(tabletId);
+ createTabletReq.setTabletId(tabletId);
TTabletSchema tSchema = new TTabletSchema();
- tSchema.setShort_key_column_count(shortKeyColumnCount);
- tSchema.setSchema_hash(schemaHash);
- tSchema.setKeys_type(keysType.toThrift());
- tSchema.setStorage_type(storageType);
+ tSchema.setShortKeyColumnCount(shortKeyColumnCount);
+ tSchema.setSchemaHash(schemaHash);
+ tSchema.setKeysType(keysType.toThrift());
+ tSchema.setStorageType(storageType);
int deleteSign = -1;
List<TColumn> tColumns = new ArrayList<TColumn>();
for (int i = 0; i < columns.size(); i++) {
@@ -172,12 +172,12 @@ public class CreateReplicaTask extends AgentTask {
TColumn tColumn = column.toThrift();
// is bloom filter column
if (bfColumns != null && bfColumns.contains(column.getName())) {
- tColumn.setIs_bloom_filter_column(true);
+ tColumn.setIsBloomFilterColumn(true);
}
// when doing schema change, some modified column has a prefix in name.
// this prefix is only used in FE, not visible to BE, so we should remove this prefix.
if(column.getName().startsWith(SchemaChangeHandler.SHADOW_NAME_PRFIX)) {
- tColumn.setColumn_name(column.getName().substring(SchemaChangeHandler.SHADOW_NAME_PRFIX.length()));
+ tColumn.setColumnName(column.getName().substring(SchemaChangeHandler.SHADOW_NAME_PRFIX.length()));
}
tColumn.setVisible(column.isVisible());
tColumns.add(tColumn);
@@ -186,7 +186,7 @@ public class CreateReplicaTask extends AgentTask {
}
}
tSchema.setColumns(tColumns);
- tSchema.setDelete_sign_idx(deleteSign);
+ tSchema.setDeleteSignIdx(deleteSign);
if (CollectionUtils.isNotEmpty(indexes)) {
List<TOlapTableIndex> tIndexes = new ArrayList<>();
@@ -198,31 +198,31 @@ public class CreateReplicaTask extends AgentTask {
}
if (bfColumns != null) {
- tSchema.setBloom_filter_fpp(bfFpp);
+ tSchema.setBloomFilterFpp(bfFpp);
}
- tSchema.setIs_in_memory(isInMemory);
- createTabletReq.setTablet_schema(tSchema);
+ tSchema.setIsInMemory(isInMemory);
+ createTabletReq.setTabletSchema(tSchema);
createTabletReq.setVersion(version);
- createTabletReq.setVersion_hash(versionHash);
+ createTabletReq.setVersionHash(versionHash);
- createTabletReq.setStorage_medium(storageMedium);
+ createTabletReq.setStorageMedium(storageMedium);
if (inRestoreMode) {
- createTabletReq.setIn_restore_mode(true);
+ createTabletReq.setInRestoreMode(true);
}
- createTabletReq.setTable_id(tableId);
- createTabletReq.setPartition_id(partitionId);
+ createTabletReq.setTableId(tableId);
+ createTabletReq.setPartitionId(partitionId);
if (baseTabletId != -1) {
- createTabletReq.setBase_tablet_id(baseTabletId);
- createTabletReq.setBase_schema_hash(baseSchemaHash);
+ createTabletReq.setBaseTabletId(baseTabletId);
+ createTabletReq.setBaseSchemaHash(baseSchemaHash);
}
if (storageFormat != null) {
- createTabletReq.setStorage_format(storageFormat);
+ createTabletReq.setStorageFormat(storageFormat);
}
- createTabletReq.setTablet_type(tabletType);
+ createTabletReq.setTabletType(tabletType);
return createTabletReq;
}
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/task/CreateRollupTask.java b/fe/fe-core/src/main/java/org/apache/doris/task/CreateRollupTask.java
index c457b1e..68d00cf 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/task/CreateRollupTask.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/task/CreateRollupTask.java
@@ -77,20 +77,20 @@ public class CreateRollupTask extends AgentTask {
public TAlterTabletReq toThrift() {
TAlterTabletReq tAlterTabletReq = new TAlterTabletReq();
- tAlterTabletReq.setBase_tablet_id(baseTabletId);
- tAlterTabletReq.setBase_schema_hash(baseSchemaHash);
+ tAlterTabletReq.setBaseTabletId(baseTabletId);
+ tAlterTabletReq.setBaseSchemaHash(baseSchemaHash);
// make 1 TCreateTableReq
TCreateTabletReq createTabletReq = new TCreateTabletReq();
- createTabletReq.setTablet_id(tabletId);
+ createTabletReq.setTabletId(tabletId);
// no need to set version
// schema
TTabletSchema tSchema = new TTabletSchema();
- tSchema.setShort_key_column_count(shortKeyColumnCount);
- tSchema.setSchema_hash(rollupSchemaHash);
- tSchema.setStorage_type(storageType);
- tSchema.setKeys_type(keysType);
+ tSchema.setShortKeyColumnCount(shortKeyColumnCount);
+ tSchema.setSchemaHash(rollupSchemaHash);
+ tSchema.setStorageType(storageType);
+ tSchema.setKeysType(keysType);
List<TColumn> tColumns = new ArrayList<TColumn>();
int deleteSign = -1;
@@ -99,7 +99,7 @@ public class CreateRollupTask extends AgentTask {
TColumn tColumn = column.toThrift();
// is bloom filter column
if (bfColumns != null && bfColumns.contains(column.getName())) {
- tColumn.setIs_bloom_filter_column(true);
+ tColumn.setIsBloomFilterColumn(true);
}
tColumn.setVisible(column.isVisible());
if (column.isDeleteSignColumn()) {
@@ -108,16 +108,16 @@ public class CreateRollupTask extends AgentTask {
tColumns.add(tColumn);
}
tSchema.setColumns(tColumns);
- tSchema.setDelete_sign_idx(deleteSign);
+ tSchema.setDeleteSignIdx(deleteSign);
if (bfColumns != null) {
- tSchema.setBloom_filter_fpp(bfFpp);
+ tSchema.setBloomFilterFpp(bfFpp);
}
- createTabletReq.setTablet_schema(tSchema);
- createTabletReq.setTable_id(tableId);
- createTabletReq.setPartition_id(partitionId);
+ createTabletReq.setTabletSchema(tSchema);
+ createTabletReq.setTableId(tableId);
+ createTabletReq.setPartitionId(partitionId);
- tAlterTabletReq.setNew_tablet_req(createTabletReq);
+ tAlterTabletReq.setNewTabletReq(createTabletReq);
return tAlterTabletReq;
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/task/DownloadTask.java b/fe/fe-core/src/main/java/org/apache/doris/task/DownloadTask.java
index 314c7d2..a2aace1 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/task/DownloadTask.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/task/DownloadTask.java
@@ -60,7 +60,7 @@ public class DownloadTask extends AgentTask {
public TDownloadReq toThrift() {
TNetworkAddress address = new TNetworkAddress(brokerAddr.ip, brokerAddr.port);
TDownloadReq req = new TDownloadReq(jobId, srcToDestPath, address);
- req.setBroker_prop(brokerProperties);
+ req.setBrokerProp(brokerProperties);
return req;
}
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/task/DropReplicaTask.java b/fe/fe-core/src/main/java/org/apache/doris/task/DropReplicaTask.java
index 653ef68..cddbe11 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/task/DropReplicaTask.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/task/DropReplicaTask.java
@@ -31,7 +31,7 @@ public class DropReplicaTask extends AgentTask {
public TDropTabletReq toThrift() {
TDropTabletReq request = new TDropTabletReq(tabletId);
if (this.schemaHash != -1) {
- request.setSchema_hash(schemaHash);
+ request.setSchemaHash(schemaHash);
}
return request;
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/task/ExportPendingTask.java b/fe/fe-core/src/main/java/org/apache/doris/task/ExportPendingTask.java
index 252ae0c..4f776a0 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/task/ExportPendingTask.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/task/ExportPendingTask.java
@@ -91,11 +91,11 @@ public class ExportPendingTask extends MasterTask {
return Status.OK;
}
for (TScanRangeLocations tablet : tabletLocations) {
- TScanRange scanRange = tablet.getScan_range();
- if (!scanRange.isSetPalo_scan_range()) {
+ TScanRange scanRange = tablet.getScanRange();
+ if (!scanRange.isSetPaloScanRange()) {
continue;
}
- TPaloScanRange paloScanRange = scanRange.getPalo_scan_range();
+ TPaloScanRange paloScanRange = scanRange.getPaloScanRange();
List<TScanRangeLocation> locations = tablet.getLocations();
for (TScanRangeLocation location : locations) {
TNetworkAddress address = location.getServer();
@@ -110,23 +110,23 @@ public class ExportPendingTask extends MasterTask {
return Status.CANCELLED;
}
TSnapshotRequest snapshotRequest = new TSnapshotRequest();
- snapshotRequest.setTablet_id(paloScanRange.getTablet_id());
- snapshotRequest.setSchema_hash(Integer.parseInt(paloScanRange.getSchema_hash()));
+ snapshotRequest.setTabletId(paloScanRange.getTabletId());
+ snapshotRequest.setSchemaHash(Integer.parseInt(paloScanRange.getSchemaHash()));
snapshotRequest.setVersion(Long.parseLong(paloScanRange.getVersion()));
- snapshotRequest.setVersion_hash(Long.parseLong(paloScanRange.getVersion_hash()));
+ snapshotRequest.setVersionHash(Long.parseLong(paloScanRange.getVersionHash()));
snapshotRequest.setTimeout(job.getTimeoutSecond());
- snapshotRequest.setPreferred_snapshot_version(TypesConstants.TPREFER_SNAPSHOT_REQ_VERSION);
+ snapshotRequest.setPreferredSnapshotVersion(TypesConstants.TPREFER_SNAPSHOT_REQ_VERSION);
AgentClient client = new AgentClient(host, port);
TAgentResult result = client.makeSnapshot(snapshotRequest);
- if (result == null || result.getStatus().getStatus_code() != TStatusCode.OK) {
- String err = "snapshot for tablet " + paloScanRange.getTablet_id() + " failed on backend "
+ if (result == null || result.getStatus().getStatusCode() != TStatusCode.OK) {
+ String err = "snapshot for tablet " + paloScanRange.getTabletId() + " failed on backend "
+ address.toString() + ". reason: "
+ (result == null ? "unknown" : result.getStatus().error_msgs);
LOG.warn("{}, export job: {}", err, job.getId());
return new Status(TStatusCode.CANCELLED, err);
}
- job.addSnapshotPath(new Pair<TNetworkAddress, String>(address, result.getSnapshot_path()));
+ job.addSnapshotPath(new Pair<TNetworkAddress, String>(address, result.getSnapshotPath()));
}
}
return Status.OK;
diff --git a/fe/fe-core/src/main/java/org/apache/doris/task/HadoopLoadPendingTask.java b/fe/fe-core/src/main/java/org/apache/doris/task/HadoopLoadPendingTask.java
index 218cfe5..a346fe8 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/task/HadoopLoadPendingTask.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/task/HadoopLoadPendingTask.java
@@ -118,7 +118,7 @@ public class HadoopLoadPendingTask extends LoadPendingTask {
EtlSubmitResult result = dppScheduler.submitEtlJob(job.getId(), job.getLabel(), job.getHadoopCluster(),
db.getFullName(), etlTaskConf, retry);
- if (result != null && result.getStatus().getStatus_code() == TStatusCode.OK) {
+ if (result != null && result.getStatus().getStatusCode() == TStatusCode.OK) {
job.setHadoopEtlJobId(result.getEtlJobId());
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/task/LoadPendingTask.java b/fe/fe-core/src/main/java/org/apache/doris/task/LoadPendingTask.java
index a86b58c..848027f 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/task/LoadPendingTask.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/task/LoadPendingTask.java
@@ -101,7 +101,7 @@ public abstract class LoadPendingTask extends MasterTask {
while (retry < RETRY_NUM) {
result = submitEtlJob(retry);
if (result != null) {
- if (result.getStatus().getStatus_code() == TStatusCode.OK) {
+ if (result.getStatus().getStatusCode() == TStatusCode.OK) {
if (load.updateLoadJobState(job, JobState.ETL)) {
LOG.info("submit etl job success. job: {}", job);
return;
@@ -113,7 +113,7 @@ public abstract class LoadPendingTask extends MasterTask {
String failMsg = "submit etl job fail";
if (result != null) {
- List<String> failMsgs = result.getStatus().getError_msgs();
+ List<String> failMsgs = result.getStatus().getErrorMsgs();
failMsg = Joiner.on(";").join(failMsgs);
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/task/MiniLoadEtlTask.java b/fe/fe-core/src/main/java/org/apache/doris/task/MiniLoadEtlTask.java
index 95b9ede..9d17432 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/task/MiniLoadEtlTask.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/task/MiniLoadEtlTask.java
@@ -69,22 +69,22 @@ public class MiniLoadEtlTask extends LoadEtlTask {
return false;
}
TStatus tStatus = result.getStatus();
- if (tStatus.getStatus_code() != TStatusCode.OK) {
- LOG.warn("get buck load etl status fail. msg: {}, job: {}", tStatus.getError_msgs(), job);
+ if (tStatus.getStatusCode() != TStatusCode.OK) {
+ LOG.warn("get buck load etl status fail. msg: {}, job: {}", tStatus.getErrorMsgs(), job);
return false;
}
// update etl task status
EtlStatus taskStatus = taskInfo.getTaskStatus();
- if (taskStatus.setState(result.getEtl_state())) {
+ if (taskStatus.setState(result.getEtlState())) {
if (result.isSetCounters()) {
taskStatus.setCounters(result.getCounters());
}
- if (result.isSetTracking_url()) {
- taskStatus.setTrackingUrl(result.getTracking_url());
+ if (result.isSetTrackingUrl()) {
+ taskStatus.setTrackingUrl(result.getTrackingUrl());
}
- if (result.isSetFile_map()) {
- taskStatus.setFileMap(result.getFile_map());
+ if (result.isSetFileMap()) {
+ taskStatus.setFileMap(result.getFileMap());
}
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/task/MiniLoadPendingTask.java b/fe/fe-core/src/main/java/org/apache/doris/task/MiniLoadPendingTask.java
index 3298db4..edf6ebd 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/task/MiniLoadPendingTask.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/task/MiniLoadPendingTask.java
@@ -127,13 +127,13 @@ public class MiniLoadPendingTask extends LoadPendingTask {
String failMsg = "backend is null or is not alive";
LOG.error(failMsg);
TStatus tStatus = new TStatus(TStatusCode.CANCELLED);
- tStatus.setError_msgs(Lists.newArrayList(failMsg));
+ tStatus.setErrorMsgs(Lists.newArrayList(failMsg));
return new EtlSubmitResult(tStatus, null);
}
AgentClient client = new AgentClient(backend.getHost(), backend.getBePort());
TAgentResult submitResult = client.submitEtlTask(request);
- if (submitResult.getStatus().getStatus_code() != TStatusCode.OK) {
+ if (submitResult.getStatus().getStatusCode() != TStatusCode.OK) {
return new EtlSubmitResult(submitResult.getStatus(), null);
}
}
@@ -179,35 +179,35 @@ public class MiniLoadPendingTask extends LoadPendingTask {
}
TMiniLoadEtlTaskRequest request = new TMiniLoadEtlTaskRequest();
- request.setProtocol_version(TAgentServiceVersion.V1);
+ request.setProtocolVersion(TAgentServiceVersion.V1);
TExecPlanFragmentParams params = new TExecPlanFragmentParams();
- params.setProtocol_version(PaloInternalServiceVersion.V1);
+ params.setProtocolVersion(PaloInternalServiceVersion.V1);
params.setFragment(fragment.toThrift());
- params.setDesc_tbl(desc.toThrift());
- params.setImport_label(job.getLabel());
- params.setDb_name(db.getFullName());
- params.setLoad_job_id(job.getId());
+ params.setDescTbl(desc.toThrift());
+ params.setImportLabel(job.getLabel());
+ params.setDbName(db.getFullName());
+ params.setLoadJobId(job.getId());
LoadErrorHub.Param param = load.getLoadErrorHubInfo();
if (param != null) {
TLoadErrorHubInfo info = param.toThrift();
if (info != null) {
- params.setLoad_error_hub_info(info);
+ params.setLoadErrorHubInfo(info);
}
}
TPlanFragmentExecParams execParams = new TPlanFragmentExecParams();
// Only use fragment id
TUniqueId uniqueId = new TUniqueId(job.getId(), taskId);
- execParams.setQuery_id(new TUniqueId(uniqueId));
- execParams.setFragment_instance_id(uniqueId);
+ execParams.setQueryId(new TUniqueId(uniqueId));
+ execParams.setFragmentInstanceId(uniqueId);
execParams.per_node_scan_ranges = Maps.newHashMap();
execParams.per_exch_num_senders = Maps.newHashMap();
execParams.destinations = Lists.newArrayList();
params.setParams(execParams);
TQueryOptions queryOptions = new TQueryOptions();
- queryOptions.setQuery_type(TQueryType.LOAD);
- params.setQuery_options(queryOptions);
+ queryOptions.setQueryType(TQueryType.LOAD);
+ params.setQueryOptions(queryOptions);
request.setParams(params);
return request;
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/task/PushTask.java b/fe/fe-core/src/main/java/org/apache/doris/task/PushTask.java
index 7160a8c..e78c515 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/task/PushTask.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/task/PushTask.java
@@ -122,18 +122,18 @@ public class PushTask extends AgentTask {
public TPushReq toThrift() {
TPushReq request = new TPushReq(tabletId, schemaHash, version, versionHash, timeoutSecond, pushType);
if (taskType == TTaskType.REALTIME_PUSH) {
- request.setPartition_id(partitionId);
- request.setTransaction_id(transactionId);
+ request.setPartitionId(partitionId);
+ request.setTransactionId(transactionId);
}
- request.setIs_schema_changing(isSchemaChanging);
+ request.setIsSchemaChanging(isSchemaChanging);
switch (pushType) {
case LOAD:
case LOAD_DELETE:
- request.setHttp_file_path(filePath);
+ request.setHttpFilePath(filePath);
if (fileSize != -1) {
- request.setHttp_file_size(fileSize);
+ request.setHttpFileSize(fileSize);
}
- request.setNeed_decompress(needDecompress);
+ request.setNeedDecompress(needDecompress);
break;
case DELETE:
List<TCondition> tConditions = new ArrayList<TCondition>();
@@ -145,8 +145,8 @@ public class PushTask extends AgentTask {
String columnName = ((SlotRef) binaryPredicate.getChild(0)).getColumnName();
String value = ((LiteralExpr) binaryPredicate.getChild(1)).getStringValue();
Operator op = binaryPredicate.getOp();
- tCondition.setColumn_name(columnName);
- tCondition.setCondition_op(op.toString());
+ tCondition.setColumnName(columnName);
+ tCondition.setConditionOp(op.toString());
conditionValues.add(value);
} else if (condition instanceof IsNullPredicate) {
IsNullPredicate isNullPredicate = (IsNullPredicate) condition;
@@ -156,29 +156,29 @@ public class PushTask extends AgentTask {
if (isNullPredicate.isNotNull()) {
value = "NOT NULL";
}
- tCondition.setColumn_name(columnName);
- tCondition.setCondition_op(op);
+ tCondition.setColumnName(columnName);
+ tCondition.setConditionOp(op);
conditionValues.add(value);
} else if (condition instanceof InPredicate) {
InPredicate inPredicate = (InPredicate) condition;
String columnName = ((SlotRef) inPredicate.getChild(0)).getColumnName();
String op = inPredicate.isNotIn() ? "!*=" : "*=";
- tCondition.setColumn_name(columnName);
- tCondition.setCondition_op(op);
+ tCondition.setColumnName(columnName);
+ tCondition.setConditionOp(op);
for (int i = 1; i <= inPredicate.getInElementNum(); i++) {
conditionValues.add(((LiteralExpr)inPredicate.getChild(i)).getStringValue());
}
}
- tCondition.setCondition_values(conditionValues);
+ tCondition.setConditionValues(conditionValues);
tConditions.add(tCondition);
}
- request.setDelete_conditions(tConditions);
+ request.setDeleteConditions(tConditions);
break;
case LOAD_V2:
- request.setBroker_scan_range(tBrokerScanRange);
- request.setDesc_tbl(tDescriptorTable);
+ request.setBrokerScanRange(tBrokerScanRange);
+ request.setDescTbl(tDescriptorTable);
break;
default:
LOG.warn("unknown push type. type: " + pushType.name());
diff --git a/fe/fe-core/src/main/java/org/apache/doris/task/SchemaChangeTask.java b/fe/fe-core/src/main/java/org/apache/doris/task/SchemaChangeTask.java
index 9c2e990..865330c 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/task/SchemaChangeTask.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/task/SchemaChangeTask.java
@@ -69,20 +69,20 @@ public class SchemaChangeTask extends AgentTask {
public TAlterTabletReq toThrift() {
TAlterTabletReq tAlterTabletReq = new TAlterTabletReq();
- tAlterTabletReq.setBase_tablet_id(tabletId);
- tAlterTabletReq.setBase_schema_hash(baseSchemaHash);
+ tAlterTabletReq.setBaseTabletId(tabletId);
+ tAlterTabletReq.setBaseSchemaHash(baseSchemaHash);
// make 1 TCreateTableReq
TCreateTabletReq createTabletReq = new TCreateTabletReq();
- createTabletReq.setTablet_id(tabletId);
+ createTabletReq.setTabletId(tabletId);
// no need to set version
// schema
TTabletSchema tSchema = new TTabletSchema();
- tSchema.setShort_key_column_count(newShortKeyColumnCount);
- tSchema.setSchema_hash(newSchemaHash);
- tSchema.setStorage_type(storageType);
- tSchema.setKeys_type(keysType);
+ tSchema.setShortKeyColumnCount(newShortKeyColumnCount);
+ tSchema.setSchemaHash(newSchemaHash);
+ tSchema.setStorageType(storageType);
+ tSchema.setKeysType(keysType);
int deleteSign = -1;
List<TColumn> tColumns = new ArrayList<TColumn>();
for (int i = 0; i < newColumns.size(); i++) {
@@ -90,7 +90,7 @@ public class SchemaChangeTask extends AgentTask {
TColumn tColumn = column.toThrift();
// is bloom filter column
if (bfColumns != null && bfColumns.contains(column.getName())) {
- tColumn.setIs_bloom_filter_column(true);
+ tColumn.setIsBloomFilterColumn(true);
}
tColumn.setVisible(column.isVisible());
if (column.isDeleteSignColumn()) {
@@ -99,16 +99,16 @@ public class SchemaChangeTask extends AgentTask {
tColumns.add(tColumn);
}
tSchema.setColumns(tColumns);
- tSchema.setDelete_sign_idx(deleteSign);
+ tSchema.setDeleteSignIdx(deleteSign);
if (bfColumns != null) {
- tSchema.setBloom_filter_fpp(bfFpp);
+ tSchema.setBloomFilterFpp(bfFpp);
}
- createTabletReq.setTablet_schema(tSchema);
- createTabletReq.setTable_id(tableId);
- createTabletReq.setPartition_id(partitionId);
+ createTabletReq.setTabletSchema(tSchema);
+ createTabletReq.setTableId(tableId);
+ createTabletReq.setPartitionId(partitionId);
- tAlterTabletReq.setNew_tablet_req(createTabletReq);
+ tAlterTabletReq.setNewTabletReq(createTabletReq);
return tAlterTabletReq;
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/task/SnapshotTask.java b/fe/fe-core/src/main/java/org/apache/doris/task/SnapshotTask.java
index 92c2741..83ca573 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/task/SnapshotTask.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/task/SnapshotTask.java
@@ -78,9 +78,9 @@ public class SnapshotTask extends AgentTask {
public TSnapshotRequest toThrift() {
TSnapshotRequest request = new TSnapshotRequest(tabletId, schemaHash);
request.setVersion(version);
- request.setVersion_hash(versionHash);
- request.setList_files(true);
- request.setPreferred_snapshot_version(TypesConstants.TPREFER_SNAPSHOT_REQ_VERSION);
+ request.setVersionHash(versionHash);
+ request.setListFiles(true);
+ request.setPreferredSnapshotVersion(TypesConstants.TPREFER_SNAPSHOT_REQ_VERSION);
request.setTimeout(timeoutMs / 1000);
return request;
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/task/StreamLoadTask.java b/fe/fe-core/src/main/java/org/apache/doris/task/StreamLoadTask.java
index 21386c7..6720cfc 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/task/StreamLoadTask.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/task/StreamLoadTask.java
@@ -215,20 +215,20 @@ public class StreamLoadTask implements LoadTaskInfo {
if (request.getJsonpaths() != null) {
jsonPaths = request.getJsonpaths();
}
- if (request.getJson_root() != null) {
- jsonRoot = request.getJson_root();
+ if (request.getJsonRoot() != null) {
+ jsonRoot = request.getJsonRoot();
}
- stripOuterArray = request.isStrip_outer_array();
+ stripOuterArray = request.isStripOuterArray();
}
- if (request.isSetMerge_type()) {
+ if (request.isSetMergeType()) {
try {
- mergeType = LoadTask.MergeType.valueOf(request.getMerge_type().toString());
+ mergeType = LoadTask.MergeType.valueOf(request.getMergeType().toString());
} catch (IllegalArgumentException e) {
- throw new UserException("unknown merge type " + request.getMerge_type().toString());
+ throw new UserException("unknown merge type " + request.getMergeType().toString());
}
}
- if (request.isSetDelete_condition()) {
- deleteCondition = parseWhereExpr(request.getDelete_condition());
+ if (request.isSetDeleteCondition()) {
+ deleteCondition = parseWhereExpr(request.getDeleteCondition());
}
if (negative && mergeType != LoadTask.MergeType.APPEND) {
throw new AnalysisException("Negative is only used when merge type is append.");
diff --git a/fe/fe-core/src/main/java/org/apache/doris/task/UpdateTabletMetaInfoTask.java b/fe/fe-core/src/main/java/org/apache/doris/task/UpdateTabletMetaInfoTask.java
index 12bb108..b7b52c8 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/task/UpdateTabletMetaInfoTask.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/task/UpdateTabletMetaInfoTask.java
@@ -109,15 +109,15 @@ public class UpdateTabletMetaInfoTask extends AgentTask {
break;
}
TTabletMetaInfo metaInfo = new TTabletMetaInfo();
- metaInfo.setTablet_id(pair.first);
- metaInfo.setSchema_hash(pair.second);
+ metaInfo.setTabletId(pair.first);
+ metaInfo.setSchemaHash(pair.second);
TabletMeta tabletMeta = Catalog.getCurrentCatalog().getTabletInvertedIndex().getTabletMeta(pair.first);
if (tabletMeta == null) {
LOG.warn("could not find tablet [{}] in meta ignore it", pair.second);
continue;
}
- metaInfo.setPartition_id(tabletMeta.getPartitionId());
- metaInfo.setMeta_type(metaType);
+ metaInfo.setPartitionId(tabletMeta.getPartitionId());
+ metaInfo.setMetaType(metaType);
metaInfos.add(metaInfo);
++tabletEntryNum;
}
@@ -128,20 +128,20 @@ public class UpdateTabletMetaInfoTask extends AgentTask {
// for schema change
for (Pair<Long, Integer> pair : tableIdWithSchemaHash) {
TTabletMetaInfo metaInfo = new TTabletMetaInfo();
- metaInfo.setTablet_id(pair.first);
- metaInfo.setSchema_hash(pair.second);
- metaInfo.setIs_in_memory(isInMemory);
- metaInfo.setMeta_type(metaType);
+ metaInfo.setTabletId(pair.first);
+ metaInfo.setSchemaHash(pair.second);
+ metaInfo.setIsInMemory(isInMemory);
+ metaInfo.setMetaType(metaType);
metaInfos.add(metaInfo);
}
} else {
// for ReportHandler
for (Triple<Long, Integer, Boolean> triple : tabletToInMemory) {
TTabletMetaInfo metaInfo = new TTabletMetaInfo();
- metaInfo.setTablet_id(triple.getLeft());
- metaInfo.setSchema_hash(triple.getMiddle());
- metaInfo.setIs_in_memory(triple.getRight());
- metaInfo.setMeta_type(metaType);
+ metaInfo.setTabletId(triple.getLeft());
+ metaInfo.setSchemaHash(triple.getMiddle());
+ metaInfo.setIsInMemory(triple.getRight());
+ metaInfo.setMetaType(metaType);
metaInfos.add(metaInfo);
}
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/task/UploadTask.java b/fe/fe-core/src/main/java/org/apache/doris/task/UploadTask.java
index 4dbd310..6f3203a 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/task/UploadTask.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/task/UploadTask.java
@@ -61,7 +61,7 @@ public class UploadTask extends AgentTask {
public TUploadReq toThrift() {
TNetworkAddress address = new TNetworkAddress(broker.ip, broker.port);
TUploadReq request = new TUploadReq(jobId, srcToDestPath, address);
- request.setBroker_prop(brokerProperties);
+ request.setBrokerProp(brokerProperties);
return request;
}
}
diff --git a/fe/fe-core/src/main/java/org/apache/doris/transaction/PublishVersionDaemon.java b/fe/fe-core/src/main/java/org/apache/doris/transaction/PublishVersionDaemon.java
index 4e9f2ba..91d84fa 100644
--- a/fe/fe-core/src/main/java/org/apache/doris/transaction/PublishVersionDaemon.java
+++ b/fe/fe-core/src/main/java/org/apache/doris/transaction/PublishVersionDaemon.java
@@ -179,7 +179,7 @@ public class PublishVersionDaemon extends MasterDaemon {
List<TPartitionVersionInfo> versionInfos = unfinishedTask.getPartitionVersionInfos();
Set<Long> errorPartitionIds = Sets.newHashSet();
for (TPartitionVersionInfo versionInfo : versionInfos) {
- errorPartitionIds.add(versionInfo.getPartition_id());
+ errorPartitionIds.add(versionInfo.getPartitionId());
}
if (errorPartitionIds.isEmpty()) {
continue;
diff --git a/fe/fe-core/src/test/java/org/apache/doris/alter/AlterTest.java b/fe/fe-core/src/test/java/org/apache/doris/alter/AlterTest.java
index 2e921f6..5431ecc 100644
--- a/fe/fe-core/src/test/java/org/apache/doris/alter/AlterTest.java
+++ b/fe/fe-core/src/test/java/org/apache/doris/alter/AlterTest.java
@@ -33,6 +33,7 @@ import org.apache.doris.common.util.TimeUtils;
import org.apache.doris.qe.ConnectContext;
import org.apache.doris.thrift.TStorageMedium;
import org.apache.doris.utframe.UtFrameUtils;
+
import com.google.common.collect.Lists;
import org.junit.AfterClass;
diff --git a/fe/fe-core/src/test/java/org/apache/doris/backup/BackupHandlerTest.java b/fe/fe-core/src/test/java/org/apache/doris/backup/BackupHandlerTest.java
index d92b795..ec02163 100644
--- a/fe/fe-core/src/test/java/org/apache/doris/backup/BackupHandlerTest.java
+++ b/fe/fe-core/src/test/java/org/apache/doris/backup/BackupHandlerTest.java
@@ -17,7 +17,6 @@
package org.apache.doris.backup;
-import mockit.*;
import org.apache.doris.analysis.BackupStmt;
import org.apache.doris.analysis.CancelBackupStmt;
import org.apache.doris.analysis.CreateRepositoryStmt;
@@ -71,6 +70,12 @@ import java.util.Comparator;
import java.util.List;
import java.util.Map;
+import mockit.Delegate;
+import mockit.Expectations;
+import mockit.Mock;
+import mockit.MockUp;
+import mockit.Mocked;
+
public class BackupHandlerTest {
private BackupHandler handler;
@@ -260,9 +265,9 @@ public class BackupHandlerTest {
0, 0, 0, 0, 0, 0, 0, 1, false);
TFinishTaskRequest request = new TFinishTaskRequest();
List<String> snapshotFiles = Lists.newArrayList();
- request.setSnapshot_files(snapshotFiles);
- request.setSnapshot_path("./snapshot/path");
- request.setTask_status(new TStatus(TStatusCode.OK));
+ request.setSnapshotFiles(snapshotFiles);
+ request.setSnapshotPath("./snapshot/path");
+ request.setTaskStatus(new TStatus(TStatusCode.OK));
handler.handleFinishedSnapshotTask(snapshotTask, request);
// handleFinishedSnapshotUploadTask
@@ -271,8 +276,8 @@ public class BackupHandlerTest {
srcToDestPath, null, null);
request = new TFinishTaskRequest();
Map<Long, List<String>> tabletFiles = Maps.newHashMap();
- request.setTablet_files(tabletFiles);
- request.setTask_status(new TStatus(TStatusCode.OK));
+ request.setTabletFiles(tabletFiles);
+ request.setTaskStatus(new TStatus(TStatusCode.OK));
handler.handleFinishedSnapshotUploadTask(uploadTask, request);
// test file persist
@@ -326,8 +331,8 @@ public class BackupHandlerTest {
snapshotTask = new SnapshotTask(null, 0, 0, restoreJob.getJobId(), CatalogMocker.TEST_DB_ID,
0, 0, 0, 0, 0, 0, 0, 1, true);
request = new TFinishTaskRequest();
- request.setSnapshot_path("./snapshot/path");
- request.setTask_status(new TStatus(TStatusCode.OK));
+ request.setSnapshotPath("./snapshot/path");
+ request.setTaskStatus(new TStatus(TStatusCode.OK));
handler.handleFinishedSnapshotTask(snapshotTask, request);
// handleDownloadSnapshotTask
@@ -335,15 +340,15 @@ public class BackupHandlerTest {
srcToDestPath, null, null);
request = new TFinishTaskRequest();
List<Long> downloadedTabletIds = Lists.newArrayList();
- request.setDownloaded_tablet_ids(downloadedTabletIds);
- request.setTask_status(new TStatus(TStatusCode.OK));
+ request.setDownloadedTabletIds(downloadedTabletIds);
+ request.setTaskStatus(new TStatus(TStatusCode.OK));
handler.handleDownloadSnapshotTask(downloadTask, request);
// handleDirMoveTask
DirMoveTask dirMoveTask = new DirMoveTask(null, 0, 0, restoreJob.getJobId(), CatalogMocker.TEST_DB_ID, 0, 0, 0,
0, "", 0, true);
request = new TFinishTaskRequest();
- request.setTask_status(new TStatus(TStatusCode.OK));
+ request.setTaskStatus(new TStatus(TStatusCode.OK));
handler.handleDirMoveTask(dirMoveTask, request);
// test file persist
diff --git a/fe/fe-core/src/test/java/org/apache/doris/backup/BackupJobTest.java b/fe/fe-core/src/test/java/org/apache/doris/backup/BackupJobTest.java
index b3ca0ac..9c1d7c1 100644
--- a/fe/fe-core/src/test/java/org/apache/doris/backup/BackupJobTest.java
+++ b/fe/fe-core/src/test/java/org/apache/doris/backup/BackupJobTest.java
@@ -17,7 +17,6 @@
package org.apache.doris.backup;
-import mockit.*;
import org.apache.doris.analysis.TableName;
import org.apache.doris.analysis.TableRef;
import org.apache.doris.backup.BackupJob.BackupJobState;
@@ -61,6 +60,12 @@ import java.util.List;
import java.util.Map;
import java.util.concurrent.atomic.AtomicLong;
+import mockit.Delegate;
+import mockit.Expectations;
+import mockit.Mock;
+import mockit.MockUp;
+import mockit.Mocked;
+
public class BackupJobTest {
private BackupJob job;
@@ -233,8 +238,8 @@ public class BackupJobTest {
TBackend tBackend = new TBackend("", 0, 1);
TFinishTaskRequest request = new TFinishTaskRequest(tBackend, TTaskType.MAKE_SNAPSHOT,
snapshotTask.getSignature(), task_status);
- request.setSnapshot_files(snapshotFiles);
- request.setSnapshot_path(snapshotPath);
+ request.setSnapshotFiles(snapshotFiles);
+ request.setSnapshotPath(snapshotPath);
Assert.assertTrue(job.finishTabletSnapshotTask(snapshotTask, request));
job.run();
Assert.assertEquals(Status.OK, job.getStatus());
@@ -264,7 +269,7 @@ public class BackupJobTest {
Map<Long, List<String>> tabletFileMap = Maps.newHashMap();
request = new TFinishTaskRequest(tBackend, TTaskType.UPLOAD,
upTask.getSignature(), task_status);
- request.setTablet_files(tabletFileMap);
+ request.setTabletFiles(tabletFileMap);
Assert.assertFalse(job.finishSnapshotUploadTask(upTask, request));
List<String> tabletFiles = Lists.newArrayList();
diff --git a/fe/fe-core/src/test/java/org/apache/doris/backup/RestoreJobTest.java b/fe/fe-core/src/test/java/org/apache/doris/backup/RestoreJobTest.java
index acad28d..5766516 100644
--- a/fe/fe-core/src/test/java/org/apache/doris/backup/RestoreJobTest.java
+++ b/fe/fe-core/src/test/java/org/apache/doris/backup/RestoreJobTest.java
@@ -17,7 +17,6 @@
package org.apache.doris.backup;
-import mockit.*;
import org.apache.doris.backup.BackupJobInfo.BackupIndexInfo;
import org.apache.doris.backup.BackupJobInfo.BackupPartitionInfo;
import org.apache.doris.backup.BackupJobInfo.BackupTableInfo;
@@ -63,6 +62,13 @@ import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicLong;
import java.util.zip.Adler32;
+import mockit.Delegate;
+import mockit.Expectations;
+import mockit.Injectable;
+import mockit.Mock;
+import mockit.MockUp;
+import mockit.Mocked;
+
public class RestoreJobTest {
private Database db;
@@ -285,7 +291,7 @@ public class RestoreJobTest {
TBackend tBackend = new TBackend("", 0, 1);
TFinishTaskRequest request = new TFinishTaskRequest(tBackend, TTaskType.MAKE_SNAPSHOT,
task.getSignature(), taskStatus);
- request.setSnapshot_path(snapshotPath);
+ request.setSnapshotPath(snapshotPath);
Assert.assertTrue(job.finishTabletSnapshotTask(task, request));
}
@@ -318,7 +324,7 @@ public class RestoreJobTest {
TBackend tBackend = new TBackend("", 0, 1);
TFinishTaskRequest request = new TFinishTaskRequest(tBackend, TTaskType.MAKE_SNAPSHOT,
agentTask.getSignature(), taskStatus);
- request.setDownloaded_tablet_ids(downloadedTabletIds);
+ request.setDownloadedTabletIds(downloadedTabletIds);
Assert.assertTrue(job.finishTabletDownloadTask((DownloadTask) agentTask, request));
}
diff --git a/fe/fe-core/src/test/java/org/apache/doris/catalog/BackendTest.java b/fe/fe-core/src/test/java/org/apache/doris/catalog/BackendTest.java
index d5f173f..2168f89 100644
--- a/fe/fe-core/src/test/java/org/apache/doris/catalog/BackendTest.java
+++ b/fe/fe-core/src/test/java/org/apache/doris/catalog/BackendTest.java
@@ -20,7 +20,6 @@ package org.apache.doris.catalog;
import org.apache.doris.analysis.AccessTestUtil;
import org.apache.doris.common.FeConstants;
import org.apache.doris.system.Backend;
-import org.apache.doris.system.SystemInfoService;
import org.apache.doris.thrift.TDisk;
import org.junit.Assert;
@@ -91,21 +90,21 @@ public class BackendTest {
TDisk disk2 = new TDisk("/data2/", 2000, 700, true);
TDisk disk3 = new TDisk("/data3/", 3000, 600, false);
- diskInfos.put(disk1.getRoot_path(), disk1);
- diskInfos.put(disk2.getRoot_path(), disk2);
- diskInfos.put(disk3.getRoot_path(), disk3);
+ diskInfos.put(disk1.getRootPath(), disk1);
+ diskInfos.put(disk2.getRootPath(), disk2);
+ diskInfos.put(disk3.getRootPath(), disk3);
// first update
backend.updateDisks(diskInfos);
- Assert.assertEquals(disk1.getDisk_total_capacity() + disk2.getDisk_total_capacity(),
+ Assert.assertEquals(disk1.getDiskTotalCapacity() + disk2.getDiskTotalCapacity(),
backend.getTotalCapacityB());
Assert.assertEquals(1, backend.getAvailableCapacityB());
// second update
- diskInfos.remove(disk1.getRoot_path());
+ diskInfos.remove(disk1.getRootPath());
backend.updateDisks(diskInfos);
- Assert.assertEquals(disk2.getDisk_total_capacity(), backend.getTotalCapacityB());
- Assert.assertEquals(disk2.getDisk_available_capacity() + 1, backend.getAvailableCapacityB());
+ Assert.assertEquals(disk2.getDiskTotalCapacity(), backend.getTotalCapacityB());
+ Assert.assertEquals(disk2.getDiskAvailableCapacity() + 1, backend.getAvailableCapacityB());
}
@Test
diff --git a/fe/fe-core/src/test/java/org/apache/doris/common/GenericPoolTest.java b/fe/fe-core/src/test/java/org/apache/doris/common/GenericPoolTest.java
index 0f7dd3e..c90fbe7 100644
--- a/fe/fe-core/src/test/java/org/apache/doris/common/GenericPoolTest.java
+++ b/fe/fe-core/src/test/java/org/apache/doris/common/GenericPoolTest.java
@@ -115,107 +115,107 @@ public class GenericPoolTest {
}
@Override
- public TExecPlanFragmentResult exec_plan_fragment(TExecPlanFragmentParams params) {
+ public TExecPlanFragmentResult execPlanFragment(TExecPlanFragmentParams params) {
return new TExecPlanFragmentResult();
}
@Override
- public TCancelPlanFragmentResult cancel_plan_fragment(TCancelPlanFragmentParams params) {
+ public TCancelPlanFragmentResult cancelPlanFragment(TCancelPlanFragmentParams params) {
return new TCancelPlanFragmentResult();
}
@Override
- public TTransmitDataResult transmit_data(TTransmitDataParams params) {
+ public TTransmitDataResult transmitData(TTransmitDataParams params) {
return new TTransmitDataResult();
}
@Override
- public TFetchDataResult fetch_data(TFetchDataParams params) {
+ public TFetchDataResult fetchData(TFetchDataParams params) {
TFetchDataResult result = new TFetchDataResult();
- result.setPacket_num(123);
- result.setResult_batch(new TResultBatch(new ArrayList<ByteBuffer>(), false, 0));
+ result.setPacketNum(123);
+ result.setResultBatch(new TResultBatch(new ArrayList<ByteBuffer>(), false, 0));
result.setEos(true);
return result;
}
@Override
- public TAgentResult submit_tasks(List<TAgentTaskRequest> tasks) throws TException {
+ public TAgentResult submitTasks(List<TAgentTaskRequest> tasks) throws TException {
return null;
}
@Override
- public TAgentResult release_snapshot(String snapshot_path) throws TException {
+ public TAgentResult releaseSnapshot(String snapshot_path) throws TException {
return null;
}
@Override
- public TAgentResult publish_cluster_state(TAgentPublishRequest request) throws TException {
+ public TAgentResult publishClusterState(TAgentPublishRequest request) throws TException {
return null;
}
@Override
- public TAgentResult submit_etl_task(TMiniLoadEtlTaskRequest request) throws TException {
+ public TAgentResult submitEtlTask(TMiniLoadEtlTaskRequest request) throws TException {
return null;
}
@Override
- public TMiniLoadEtlStatusResult get_etl_status(TMiniLoadEtlStatusRequest request) throws TException {
+ public TMiniLoadEtlStatusResult getEtlStatus(TMiniLoadEtlStatusRequest request) throws TException {
return null;
}
@Override
- public TAgentResult delete_etl_files(TDeleteEtlFilesRequest request) throws TException {
+ public TAgentResult deleteEtlFiles(TDeleteEtlFilesRequest request) throws TException {
return null;
}
@Override
- public TAgentResult make_snapshot(TSnapshotRequest snapshot_request) throws TException {
+ public TAgentResult makeSnapshot(TSnapshotRequest snapshot_request) throws TException {
// TODO Auto-generated method stub
return null;
}
@Override
- public TStatus submit_export_task(TExportTaskRequest request) throws TException {
+ public TStatus submitExportTask(TExportTaskRequest request) throws TException {
// TODO Auto-generated method stub
return null;
}
@Override
- public TExportStatusResult get_export_status(TUniqueId task_id) throws TException {
+ public TExportStatusResult getExportStatus(TUniqueId task_id) throws TException {
// TODO Auto-generated method stub
return null;
}
@Override
- public TStatus erase_export_task(TUniqueId task_id) throws TException {
+ public TStatus eraseExportTask(TUniqueId task_id) throws TException {
// TODO Auto-generated method stub
return null;
}
@Override
- public TTabletStatResult get_tablet_stat() throws TException {
+ public TTabletStatResult getTabletStat() throws TException {
// TODO Auto-generated method stub
return null;
}
@Override
- public TStatus submit_routine_load_task(List<TRoutineLoadTask> tasks) throws TException {
+ public TStatus submitRoutineLoadTask(List<TRoutineLoadTask> tasks) throws TException {
// TODO Auto-generated method stub
return null;
}
@Override
- public TScanOpenResult open_scanner(TScanOpenParams params) throws TException {
+ public TScanOpenResult openScanner(TScanOpenParams params) throws TException {
return null;
}
@Override
- public TScanBatchResult get_next(TScanNextBatchParams params) throws TException {
+ public TScanBatchResult getNext(TScanNextBatchParams params) throws TException {
return null;
}
@Override
- public TScanCloseResult close_scanner(TScanCloseParams params) throws TException {
+ public TScanCloseResult closeScanner(TScanCloseParams params) throws TException {
return null;
}
}
@@ -225,9 +225,9 @@ public class GenericPoolTest {
TNetworkAddress address = new TNetworkAddress(ip, port);
BackendService.Client object = backendService.borrowObject(address);
- TFetchDataResult result = object.fetch_data(new TFetchDataParams(
+ TFetchDataResult result = object.fetchData(new TFetchDataParams(
PaloInternalServiceVersion.V1, new TUniqueId()));
- Assert.assertEquals(result.getPacket_num(), 123);
+ Assert.assertEquals(result.getPacketNum(), 123);
backendService.returnObject(address, object);
}
diff --git a/fe/fe-core/src/test/java/org/apache/doris/planner/DistributedPlannerTest.java b/fe/fe-core/src/test/java/org/apache/doris/planner/DistributedPlannerTest.java
index 6bb1043..6c480b3 100644
--- a/fe/fe-core/src/test/java/org/apache/doris/planner/DistributedPlannerTest.java
+++ b/fe/fe-core/src/test/java/org/apache/doris/planner/DistributedPlannerTest.java
@@ -110,7 +110,7 @@ public class DistributedPlannerTest {
};
PlanFragment assertFragment = Deencapsulation.invoke(distributedPlanner, "createAssertFragment",
- assertNumRowsNode, inputFragment);
+ assertNumRowsNode, inputFragment);
Assert.assertFalse(assertFragment.isPartitioned());
Assert.assertSame(assertNumRowsNode, assertFragment.getPlanRoot());
}
@@ -118,11 +118,11 @@ public class DistributedPlannerTest {
@Test
public void testAssertFragmentWithUnpartitionInput(@Injectable AssertNumRowsNode assertNumRowsNode,
@Injectable PlanFragment inputFragment,
- @Mocked PlannerContext plannerContext){
+ @Mocked PlannerContext plannerContext) {
DistributedPlanner distributedPlanner = new DistributedPlanner(plannerContext);
PlanFragment assertFragment = Deencapsulation.invoke(distributedPlanner, "createAssertFragment",
- assertNumRowsNode, inputFragment);
+ assertNumRowsNode, inputFragment);
Assert.assertSame(assertFragment, inputFragment);
Assert.assertTrue(assertFragment.getPlanRoot() instanceof AssertNumRowsNode);
}
diff --git a/fe/fe-core/src/test/java/org/apache/doris/planner/QueryPlanTest.java b/fe/fe-core/src/test/java/org/apache/doris/planner/QueryPlanTest.java
index 7572bef..006a402 100644
--- a/fe/fe-core/src/test/java/org/apache/doris/planner/QueryPlanTest.java
+++ b/fe/fe-core/src/test/java/org/apache/doris/planner/QueryPlanTest.java
@@ -71,34 +71,34 @@ public class QueryPlanTest {
String createDbStmtStr = "create database test;";
CreateDbStmt createDbStmt = (CreateDbStmt) UtFrameUtils.parseAndAnalyzeStmt(createDbStmtStr, connectContext);
Catalog.getCurrentCatalog().createDb(createDbStmt);
-
- createTable("create table test.test1\n" +
+
+ createTable("create table test.test1\n" +
"(\n" +
" query_id varchar(48) comment \"Unique query id\",\n" +
" time datetime not null comment \"Query start time\",\n" +
- " client_ip varchar(32) comment \"Client IP\",\n" +
- " user varchar(64) comment \"User name\",\n" +
- " db varchar(96) comment \"Database of this query\",\n" +
- " state varchar(8) comment \"Query result state. EOF, ERR, OK\",\n" +
- " query_time bigint comment \"Query execution time in millisecond\",\n" +
- " scan_bytes bigint comment \"Total scan bytes of this query\",\n" +
- " scan_rows bigint comment \"Total scan rows of this query\",\n" +
- " return_rows bigint comment \"Returned rows of this query\",\n" +
- " stmt_id int comment \"An incremental id of statement\",\n" +
- " is_query tinyint comment \"Is this statemt a query. 1 or 0\",\n" +
- " frontend_ip varchar(32) comment \"Frontend ip of executing this statement\",\n" +
- " stmt varchar(2048) comment \"The original statement, trimed if longer than 2048 bytes\"\n" +
- ")\n" +
- "partition by range(time) ()\n" +
- "distributed by hash(query_id) buckets 1\n" +
- "properties(\n" +
- " \"dynamic_partition.time_unit\" = \"DAY\",\n" +
- " \"dynamic_partition.start\" = \"-30\",\n" +
- " \"dynamic_partition.end\" = \"3\",\n" +
- " \"dynamic_partition.prefix\" = \"p\",\n" +
- " \"dynamic_partition.buckets\" = \"1\",\n" +
- " \"dynamic_partition.enable\" = \"true\",\n" +
- " \"replication_num\" = \"1\"\n" +
+ " client_ip varchar(32) comment \"Client IP\",\n" +
+ " user varchar(64) comment \"User name\",\n" +
+ " db varchar(96) comment \"Database of this query\",\n" +
+ " state varchar(8) comment \"Query result state. EOF, ERR, OK\",\n" +
+ " query_time bigint comment \"Query execution time in millisecond\",\n" +
+ " scan_bytes bigint comment \"Total scan bytes of this query\",\n" +
+ " scan_rows bigint comment \"Total scan rows of this query\",\n" +
+ " return_rows bigint comment \"Returned rows of this query\",\n" +
+ " stmt_id int comment \"An incremental id of statement\",\n" +
+ " is_query tinyint comment \"Is this statemt a query. 1 or 0\",\n" +
+ " frontend_ip varchar(32) comment \"Frontend ip of executing this statement\",\n" +
+ " stmt varchar(2048) comment \"The original statement, trimed if longer than 2048 bytes\"\n" +
+ ")\n" +
+ "partition by range(time) ()\n" +
+ "distributed by hash(query_id) buckets 1\n" +
+ "properties(\n" +
+ " \"dynamic_partition.time_unit\" = \"DAY\",\n" +
+ " \"dynamic_partition.start\" = \"-30\",\n" +
+ " \"dynamic_partition.end\" = \"3\",\n" +
+ " \"dynamic_partition.prefix\" = \"p\",\n" +
+ " \"dynamic_partition.buckets\" = \"1\",\n" +
+ " \"dynamic_partition.enable\" = \"true\",\n" +
+ " \"replication_num\" = \"1\"\n" +
");");
createTable("CREATE TABLE test.bitmap_table (\n" +
@@ -157,45 +157,45 @@ public class QueryPlanTest {
"PROPERTIES (\n" +
" \"replication_num\" = \"1\"\n" +
");");
-
+
createTable("CREATE TABLE test.`bigtable` (\n" +
- " `k1` tinyint(4) NULL COMMENT \"\",\n" +
- " `k2` smallint(6) NULL COMMENT \"\",\n" +
- " `k3` int(11) NULL COMMENT \"\",\n" +
- " `k4` bigint(20) NULL COMMENT \"\",\n" +
- " `k5` decimal(9, 3) NULL COMMENT \"\",\n" +
- " `k6` char(5) NULL COMMENT \"\",\n" +
- " `k10` date NULL COMMENT \"\",\n" +
- " `k11` datetime NULL COMMENT \"\",\n" +
- " `k7` varchar(20) NULL COMMENT \"\",\n" +
- " `k8` double MAX NULL COMMENT \"\",\n" +
- " `k9` float SUM NULL COMMENT \"\"\n" +
- ") ENGINE=OLAP\n" +
- "AGGREGATE KEY(`k1`, `k2`, `k3`, `k4`, `k5`, `k6`, `k10`, `k11`, `k7`)\n" +
- "COMMENT \"OLAP\"\n" +
- "DISTRIBUTED BY HASH(`k1`) BUCKETS 5\n" +
- "PROPERTIES (\n" +
- "\"replication_num\" = \"1\"\n" +
+ " `k1` tinyint(4) NULL COMMENT \"\",\n" +
+ " `k2` smallint(6) NULL COMMENT \"\",\n" +
+ " `k3` int(11) NULL COMMENT \"\",\n" +
+ " `k4` bigint(20) NULL COMMENT \"\",\n" +
+ " `k5` decimal(9, 3) NULL COMMENT \"\",\n" +
+ " `k6` char(5) NULL COMMENT \"\",\n" +
+ " `k10` date NULL COMMENT \"\",\n" +
+ " `k11` datetime NULL COMMENT \"\",\n" +
+ " `k7` varchar(20) NULL COMMENT \"\",\n" +
+ " `k8` double MAX NULL COMMENT \"\",\n" +
+ " `k9` float SUM NULL COMMENT \"\"\n" +
+ ") ENGINE=OLAP\n" +
+ "AGGREGATE KEY(`k1`, `k2`, `k3`, `k4`, `k5`, `k6`, `k10`, `k11`, `k7`)\n" +
+ "COMMENT \"OLAP\"\n" +
+ "DISTRIBUTED BY HASH(`k1`) BUCKETS 5\n" +
+ "PROPERTIES (\n" +
+ "\"replication_num\" = \"1\"\n" +
");");
-
- createTable("CREATE TABLE test.`baseall` (\n" +
- " `k1` tinyint(4) NULL COMMENT \"\",\n" +
- " `k2` smallint(6) NULL COMMENT \"\",\n" +
- " `k3` int(11) NULL COMMENT \"\",\n" +
- " `k4` bigint(20) NULL COMMENT \"\",\n" +
- " `k5` decimal(9, 3) NULL COMMENT \"\",\n" +
- " `k6` char(5) NULL COMMENT \"\",\n" +
- " `k10` date NULL COMMENT \"\",\n" +
- " `k11` datetime NULL COMMENT \"\",\n" +
- " `k7` varchar(20) NULL COMMENT \"\",\n" +
- " `k8` double MAX NULL COMMENT \"\",\n" +
- " `k9` float SUM NULL COMMENT \"\"\n" +
- ") ENGINE=OLAP\n" +
- "AGGREGATE KEY(`k1`, `k2`, `k3`, `k4`, `k5`, `k6`, `k10`, `k11`, `k7`)\n" +
- "COMMENT \"OLAP\"\n" +
- "DISTRIBUTED BY HASH(`k1`) BUCKETS 5\n" +
- "PROPERTIES (\n" +
- "\"replication_num\" = \"1\"\n" +
+
+ createTable("CREATE TABLE test.`baseall` (\n" +
+ " `k1` tinyint(4) NULL COMMENT \"\",\n" +
+ " `k2` smallint(6) NULL COMMENT \"\",\n" +
+ " `k3` int(11) NULL COMMENT \"\",\n" +
+ " `k4` bigint(20) NULL COMMENT \"\",\n" +
+ " `k5` decimal(9, 3) NULL COMMENT \"\",\n" +
+ " `k6` char(5) NULL COMMENT \"\",\n" +
+ " `k10` date NULL COMMENT \"\",\n" +
+ " `k11` datetime NULL COMMENT \"\",\n" +
+ " `k7` varchar(20) NULL COMMENT \"\",\n" +
+ " `k8` double MAX NULL COMMENT \"\",\n" +
+ " `k9` float SUM NULL COMMENT \"\"\n" +
+ ") ENGINE=OLAP\n" +
+ "AGGREGATE KEY(`k1`, `k2`, `k3`, `k4`, `k5`, `k6`, `k10`, `k11`, `k7`)\n" +
+ "COMMENT \"OLAP\"\n" +
+ "DISTRIBUTED BY HASH(`k1`) BUCKETS 5\n" +
+ "PROPERTIES (\n" +
+ "\"replication_num\" = \"1\"\n" +
");");
createTable("CREATE TABLE test.`dynamic_partition` (\n" +
@@ -475,7 +475,7 @@ public class QueryPlanTest {
String sql = "select * from test.baseall a where k1 in (select k1 from test.bigtable b where k2 > 0 and k1 = 1);";
UtFrameUtils.getSQLPlanOrErrorMsg(connectContext, "explain " + sql);
Assert.assertEquals(MysqlStateType.EOF, connectContext.getState().getStateType());
-
+
sql = "SHOW VARIABLES LIKE 'lower_case_%'; SHOW VARIABLES LIKE 'sql_mode'";
List<StatementBase> stmts = UtFrameUtils.parseAndAnalyzeStmts(sql, connectContext);
Assert.assertEquals(2, stmts.size());
@@ -486,11 +486,11 @@ public class QueryPlanTest {
String sql = "SHOW VARIABLES LIKE 'lower_case_%'; SHOW VARIABLES LIKE 'sql_mode'";
List<StatementBase>stmts = UtFrameUtils.parseAndAnalyzeStmts(sql, connectContext);
Assert.assertEquals(2, stmts.size());
-
+
sql = "SHOW VARIABLES LIKE 'lower_case_%';;;";
stmts = UtFrameUtils.parseAndAnalyzeStmts(sql, connectContext);
Assert.assertEquals(1, stmts.size());
-
+
sql = "SHOW VARIABLES LIKE 'lower_case_%';;;SHOW VARIABLES LIKE 'lower_case_%';";
stmts = UtFrameUtils.parseAndAnalyzeStmts(sql, connectContext);
Assert.assertEquals(4, stmts.size());
@@ -970,7 +970,7 @@ public class QueryPlanTest {
explainString = UtFrameUtils.getSQLPlanOrErrorMsg(connectContext, queryStr);
Assert.assertTrue(explainString.contains("INNER JOIN (BROADCAST)"));
Assert.assertTrue(explainString.contains("1:SCAN MYSQL"));
-
+
queryStr = "explain select * from jointest t1, mysql_table t2, mysql_table t3 where t1.k1 = t3.k1";
explainString = UtFrameUtils.getSQLPlanOrErrorMsg(connectContext, queryStr);
Assert.assertFalse(explainString.contains("INNER JOIN (PARTITIONED)"));
@@ -980,11 +980,11 @@ public class QueryPlanTest {
public void testPreferBroadcastJoin() throws Exception {
connectContext.setDatabase("default_cluster:test");
String queryStr = "explain select * from (select k1 from jointest group by k1)t2, jointest t1 where t1.k1 = t2.k1";
-
+
// default set PreferBroadcastJoin true
String explainString = UtFrameUtils.getSQLPlanOrErrorMsg(connectContext, queryStr);
Assert.assertTrue(explainString.contains("INNER JOIN (BROADCAST)"));
-
+
connectContext.getSessionVariable().setPreferJoinMethod("shuffle");
explainString = UtFrameUtils.getSQLPlanOrErrorMsg(connectContext, queryStr);
Assert.assertTrue(explainString.contains("INNER JOIN (PARTITIONED)"));
diff --git a/fe/fe-core/src/test/java/org/apache/doris/qe/CoordinatorTest.java b/fe/fe-core/src/test/java/org/apache/doris/qe/CoordinatorTest.java
index cc72aee..cb2b5d9 100644
--- a/fe/fe-core/src/test/java/org/apache/doris/qe/CoordinatorTest.java
+++ b/fe/fe-core/src/test/java/org/apache/doris/qe/CoordinatorTest.java
@@ -188,26 +188,26 @@ public class CoordinatorTest extends Coordinator {
TScanRangeLocations scanRangeLocationsA = new TScanRangeLocations();
List<TScanRangeLocation> listLocationsA = new ArrayList<TScanRangeLocation>();
listLocationsA.add((new TScanRangeLocation())
- .setServer(new TNetworkAddress("machineA", 10000)).setBackend_id(0));
+ .setServer(new TNetworkAddress("machineA", 10000)).setBackendId(0));
listLocationsA.add((new TScanRangeLocation())
- .setServer(new TNetworkAddress("machineB", 10000)).setBackend_id(1));
- scanRangeLocationsA.setLocations(listLocationsA).setScan_range(new TScanRange());
+ .setServer(new TNetworkAddress("machineB", 10000)).setBackendId(1));
+ scanRangeLocationsA.setLocations(listLocationsA).setScanRange(new TScanRange());
TScanRangeLocations scanRangeLocationsB = new TScanRangeLocations();
List<TScanRangeLocation> listLocationsB = new ArrayList<TScanRangeLocation>();
listLocationsB.add((new TScanRangeLocation())
- .setServer(new TNetworkAddress("machineB", 10000)).setBackend_id(1));
+ .setServer(new TNetworkAddress("machineB", 10000)).setBackendId(1));
listLocationsB.add((new TScanRangeLocation())
- .setServer(new TNetworkAddress("machineC", 10000)).setBackend_id(2));
- scanRangeLocationsB.setLocations(listLocationsB).setScan_range(new TScanRange());
+ .setServer(new TNetworkAddress("machineC", 10000)).setBackendId(2));
+ scanRangeLocationsB.setLocations(listLocationsB).setScanRange(new TScanRange());
TScanRangeLocations scanRangeLocationsC = new TScanRangeLocations();
List<TScanRangeLocation> listLocationsC = new ArrayList<TScanRangeLocation>();
listLocationsC.add((new TScanRangeLocation())
- .setServer(new TNetworkAddress("machineC", 10000)).setBackend_id(2));
+ .setServer(new TNetworkAddress("machineC", 10000)).setBackendId(2));
listLocationsC.add((new TScanRangeLocation())
- .setServer(new TNetworkAddress("machineA", 10000)).setBackend_id(0));
- scanRangeLocationsC.setLocations(listLocationsC).setScan_range(new TScanRange());
+ .setServer(new TNetworkAddress("machineA", 10000)).setBackendId(0));
+ scanRangeLocationsC.setLocations(listLocationsC).setScanRange(new TScanRange());
// 场景1: 2个scanRange
{
@@ -437,7 +437,7 @@ public class CoordinatorTest extends Coordinator {
(ConcurrentMap<TUniqueId, BackendExecState>) getField(coor, "backendExecStateMap");
TQueryOptions privateQueryOptions = (TQueryOptions) getField(coor, "queryOptions");
// 设置超时时间为2s,尽快返回连接超时
- privateQueryOptions.setQuery_timeout(2);
+ privateQueryOptions.setQueryTimeout(2);
// Configure.qe_query_timeout_s = 2;
privateFragmentExecParams.clear();
diff --git a/fe/fe-core/src/test/java/org/apache/doris/qe/SimpleSchedulerTest.java b/fe/fe-core/src/test/java/org/apache/doris/qe/SimpleSchedulerTest.java
index 7bd6e6b..d0342b9 100644
--- a/fe/fe-core/src/test/java/org/apache/doris/qe/SimpleSchedulerTest.java
+++ b/fe/fe-core/src/test/java/org/apache/doris/qe/SimpleSchedulerTest.java
@@ -86,8 +86,8 @@ public class SimpleSchedulerTest {
List<TScanRangeLocation> twoLocations = new ArrayList<TScanRangeLocation>();
TScanRangeLocation locationA = new TScanRangeLocation();
TScanRangeLocation locationB = new TScanRangeLocation();
- locationA.setBackend_id(20);
- locationA.setBackend_id(30);
+ locationA.setBackendId(20);
+ locationA.setBackendId(30);
twoLocations.add(locationA);
twoLocations.add(locationB);
diff --git a/fe/fe-core/src/test/java/org/apache/doris/task/AgentTaskTest.java b/fe/fe-core/src/test/java/org/apache/doris/task/AgentTaskTest.java
index 8a1eadf..3065a1f 100644
--- a/fe/fe-core/src/test/java/org/apache/doris/task/AgentTaskTest.java
+++ b/fe/fe-core/src/test/java/org/apache/doris/task/AgentTaskTest.java
@@ -179,39 +179,39 @@ public class AgentTaskTest {
// create
TAgentTaskRequest request = (TAgentTaskRequest) toAgentTaskRequest.invoke(agentBatchTask, createReplicaTask);
- Assert.assertEquals(TTaskType.CREATE, request.getTask_type());
+ Assert.assertEquals(TTaskType.CREATE, request.getTaskType());
Assert.assertEquals(createReplicaTask.getSignature(), request.getSignature());
- Assert.assertNotNull(request.getCreate_tablet_req());
+ Assert.assertNotNull(request.getCreateTabletReq());
// drop
TAgentTaskRequest request2 = (TAgentTaskRequest) toAgentTaskRequest.invoke(agentBatchTask, dropTask);
- Assert.assertEquals(TTaskType.DROP, request2.getTask_type());
+ Assert.assertEquals(TTaskType.DROP, request2.getTaskType());
Assert.assertEquals(dropTask.getSignature(), request2.getSignature());
- Assert.assertNotNull(request2.getDrop_tablet_req());
+ Assert.assertNotNull(request2.getDropTabletReq());
// push
TAgentTaskRequest request3 = (TAgentTaskRequest) toAgentTaskRequest.invoke(agentBatchTask, pushTask);
- Assert.assertEquals(TTaskType.PUSH, request3.getTask_type());
+ Assert.assertEquals(TTaskType.PUSH, request3.getTaskType());
Assert.assertEquals(pushTask.getSignature(), request3.getSignature());
- Assert.assertNotNull(request3.getPush_req());
+ Assert.assertNotNull(request3.getPushReq());
// clone
TAgentTaskRequest request4 = (TAgentTaskRequest) toAgentTaskRequest.invoke(agentBatchTask, cloneTask);
- Assert.assertEquals(TTaskType.CLONE, request4.getTask_type());
+ Assert.assertEquals(TTaskType.CLONE, request4.getTaskType());
Assert.assertEquals(cloneTask.getSignature(), request4.getSignature());
- Assert.assertNotNull(request4.getClone_req());
+ Assert.assertNotNull(request4.getCloneReq());
// rollup
TAgentTaskRequest request5 = (TAgentTaskRequest) toAgentTaskRequest.invoke(agentBatchTask, rollupTask);
- Assert.assertEquals(TTaskType.ROLLUP, request5.getTask_type());
+ Assert.assertEquals(TTaskType.ROLLUP, request5.getTaskType());
Assert.assertEquals(rollupTask.getSignature(), request5.getSignature());
- Assert.assertNotNull(request5.getAlter_tablet_req());
+ Assert.assertNotNull(request5.getAlterTabletReq());
// schemaChange
TAgentTaskRequest request6 = (TAgentTaskRequest) toAgentTaskRequest.invoke(agentBatchTask, schemaChangeTask);
- Assert.assertEquals(TTaskType.SCHEMA_CHANGE, request6.getTask_type());
+ Assert.assertEquals(TTaskType.SCHEMA_CHANGE, request6.getTaskType());
Assert.assertEquals(schemaChangeTask.getSignature(), request6.getSignature());
- Assert.assertNotNull(request6.getAlter_tablet_req());
+ Assert.assertNotNull(request6.getAlterTabletReq());
}
@Test
diff --git a/fe/fe-core/src/test/java/org/apache/doris/transaction/GlobalTransactionMgrTest.java b/fe/fe-core/src/test/java/org/apache/doris/transaction/GlobalTransactionMgrTest.java
index 28f14d3..97c8654 100644
--- a/fe/fe-core/src/test/java/org/apache/doris/transaction/GlobalTransactionMgrTest.java
+++ b/fe/fe-core/src/test/java/org/apache/doris/transaction/GlobalTransactionMgrTest.java
@@ -70,6 +70,10 @@ import java.util.UUID;
import mockit.Injectable;
import mockit.Mocked;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
public class GlobalTransactionMgrTest {
private static FakeEditLog fakeEditLog;
diff --git a/fe/fe-core/src/test/java/org/apache/doris/utframe/MockedBackendFactory.java b/fe/fe-core/src/test/java/org/apache/doris/utframe/MockedBackendFactory.java
index ebe4d1a..06b6ecd 100644
--- a/fe/fe-core/src/test/java/org/apache/doris/utframe/MockedBackendFactory.java
+++ b/fe/fe-core/src/test/java/org/apache/doris/utframe/MockedBackendFactory.java
@@ -126,7 +126,7 @@ public class MockedBackendFactory {
@Override
public THeartbeatResult heartbeat(TMasterInfo master_info) throws TException {
TBackendInfo backendInfo = new TBackendInfo(beThriftPort, beHttpPort);
- backendInfo.setBrpc_port(beBrpcPort);
+ backendInfo.setBrpcPort(beBrpcPort);
THeartbeatResult result = new THeartbeatResult(new TStatus(TStatusCode.OK), backendInfo);
return result;
}
@@ -165,11 +165,11 @@ public class MockedBackendFactory {
while (true) {
try {
TAgentTaskRequest request = taskQueue.take();
- System.out.println("get agent task request. type: " + request.getTask_type()
+ System.out.println("get agent task request. type: " + request.getTaskType()
+ ", signature: " + request.getSignature() + ", fe addr: " + backend.getFeAddress());
TFinishTaskRequest finishTaskRequest = new TFinishTaskRequest(tBackend,
- request.getTask_type(), request.getSignature(), new TStatus(TStatusCode.OK));
- finishTaskRequest.setReport_version(++reportVersion);
+ request.getTaskType(), request.getSignature(), new TStatus(TStatusCode.OK));
+ finishTaskRequest.setReportVersion(++reportVersion);
FrontendService.Client client = ClientPool.frontendPool.borrowObject(backend.getFeAddress(), 2000);
System.out.println("get fe " + backend.getFeAddress() + " client: " + client);
@@ -183,102 +183,102 @@ public class MockedBackendFactory {
}
@Override
- public TExecPlanFragmentResult exec_plan_fragment(TExecPlanFragmentParams params) throws TException {
+ public TExecPlanFragmentResult execPlanFragment(TExecPlanFragmentParams params) throws TException {
return null;
}
@Override
- public TCancelPlanFragmentResult cancel_plan_fragment(TCancelPlanFragmentParams params) throws TException {
+ public TCancelPlanFragmentResult cancelPlanFragment(TCancelPlanFragmentParams params) throws TException {
return null;
}
@Override
- public TTransmitDataResult transmit_data(TTransmitDataParams params) throws TException {
+ public TTransmitDataResult transmitData(TTransmitDataParams params) throws TException {
return null;
}
@Override
- public TFetchDataResult fetch_data(TFetchDataParams params) throws TException {
+ public TFetchDataResult fetchData(TFetchDataParams params) throws TException {
return null;
}
@Override
- public TAgentResult submit_tasks(List<TAgentTaskRequest> tasks) throws TException {
+ public TAgentResult submitTasks(List<TAgentTaskRequest> tasks) throws TException {
for (TAgentTaskRequest request : tasks) {
taskQueue.add(request);
- System.out.println("receive agent task request. type: " + request.getTask_type() + ", signature: "
+ System.out.println("receive agent task request. type: " + request.getTaskType() + ", signature: "
+ request.getSignature());
}
return new TAgentResult(new TStatus(TStatusCode.OK));
}
@Override
- public TAgentResult make_snapshot(TSnapshotRequest snapshot_request) throws TException {
+ public TAgentResult makeSnapshot(TSnapshotRequest snapshot_request) throws TException {
return new TAgentResult(new TStatus(TStatusCode.OK));
}
@Override
- public TAgentResult release_snapshot(String snapshot_path) throws TException {
+ public TAgentResult releaseSnapshot(String snapshot_path) throws TException {
return new TAgentResult(new TStatus(TStatusCode.OK));
}
@Override
- public TAgentResult publish_cluster_state(TAgentPublishRequest request) throws TException {
+ public TAgentResult publishClusterState(TAgentPublishRequest request) throws TException {
return new TAgentResult(new TStatus(TStatusCode.OK));
}
@Override
- public TAgentResult submit_etl_task(TMiniLoadEtlTaskRequest request) throws TException {
+ public TAgentResult submitEtlTask(TMiniLoadEtlTaskRequest request) throws TException {
return new TAgentResult(new TStatus(TStatusCode.OK));
}
@Override
- public TMiniLoadEtlStatusResult get_etl_status(TMiniLoadEtlStatusRequest request) throws TException {
+ public TMiniLoadEtlStatusResult getEtlStatus(TMiniLoadEtlStatusRequest request) throws TException {
return new TMiniLoadEtlStatusResult(new TStatus(TStatusCode.OK), TEtlState.FINISHED);
}
@Override
- public TAgentResult delete_etl_files(TDeleteEtlFilesRequest request) throws TException {
+ public TAgentResult deleteEtlFiles(TDeleteEtlFilesRequest request) throws TException {
return new TAgentResult(new TStatus(TStatusCode.OK));
}
@Override
- public TStatus submit_export_task(TExportTaskRequest request) throws TException {
+ public TStatus submitExportTask(TExportTaskRequest request) throws TException {
return new TStatus(TStatusCode.OK);
}
@Override
- public TExportStatusResult get_export_status(TUniqueId task_id) throws TException {
+ public TExportStatusResult getExportStatus(TUniqueId task_id) throws TException {
return new TExportStatusResult(new TStatus(TStatusCode.OK), TExportState.FINISHED);
}
@Override
- public TStatus erase_export_task(TUniqueId task_id) throws TException {
+ public TStatus eraseExportTask(TUniqueId task_id) throws TException {
return new TStatus(TStatusCode.OK);
}
@Override
- public TTabletStatResult get_tablet_stat() throws TException {
+ public TTabletStatResult getTabletStat() throws TException {
return new TTabletStatResult(Maps.newHashMap());
}
@Override
- public TStatus submit_routine_load_task(List<TRoutineLoadTask> tasks) throws TException {
+ public TStatus submitRoutineLoadTask(List<TRoutineLoadTask> tasks) throws TException {
return new TStatus(TStatusCode.OK);
}
@Override
- public TScanOpenResult open_scanner(TScanOpenParams params) throws TException {
+ public TScanOpenResult openScanner(TScanOpenParams params) throws TException {
return null;
}
@Override
- public TScanBatchResult get_next(TScanNextBatchParams params) throws TException {
+ public TScanBatchResult getNext(TScanNextBatchParams params) throws TException {
return null;
}
@Override
- public TScanCloseResult close_scanner(TScanCloseParams params) throws TException {
+ public TScanCloseResult closeScanner(TScanCloseParams params) throws TException {
return null;
}
}
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@doris.apache.org
For additional commands, e-mail: commits-help@doris.apache.org