Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -630,17 +630,17 @@ public void deleteTablet(long tabletId) {
public void addReplica(long tabletId, Replica replica) {
long stamp = writeLock();
try {
Preconditions.checkState(tabletMetaMap.containsKey(tabletId),
"tablet " + tabletId + " not exists, replica " + replica.getId()
+ ", backend " + replica.getBackendIdWithoutException());
// cloud mode, create table not need backendId, represent with -1.
long backendId = Config.isCloudMode() ? -1 : replica.getBackendIdWithoutException();
Preconditions.checkState(tabletMetaMap.containsKey(tabletId),
"tablet " + tabletId + " not exists, replica " + replica.getId()
+ ", backend " + backendId);
replicaMetaTable.put(tabletId, backendId, replica);
replicaToTabletMap.put(replica.getId(), tabletId);
backingReplicaMetaTable.put(backendId, tabletId, replica);
if (LOG.isDebugEnabled()) {
LOG.debug("add replica {} of tablet {} in backend {}",
replica.getId(), tabletId, replica.getBackendIdWithoutException());
replica.getId(), tabletId, backendId);
}
} finally {
writeUnlock(stamp);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@

import com.google.common.collect.ImmutableList;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.Lists;

import java.util.Arrays;
import java.util.List;

/*
Expand Down Expand Up @@ -116,7 +116,7 @@ public ProcResult fetchResult() throws AnalysisException {
if (Config.enable_query_hit_stats) {
queryHits = QueryStatsUtil.getMergedReplicaStats(replica.getId());
}
List<String> replicaInfo = Arrays.asList(String.valueOf(replica.getId()),
List<String> replicaInfo = Lists.newArrayList(String.valueOf(replica.getId()),
String.valueOf(replica.getBackendIdWithoutException()),
String.valueOf(replica.getVersion()),
String.valueOf(replica.getLastSuccessVersion()),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@ private TMasterOpRequest buildStmtForwardParams() throws AnalysisException {
cluster = ctx.getCloudCluster(false);
} catch (Exception e) {
LOG.warn("failed to get cloud compute group", e);
throw new AnalysisException("failed to get cloud compute group", e);
}
if (!Strings.isNullOrEmpty(cluster)) {
params.setCloudCluster(cluster);
Expand Down