Skip to content

Commit f170513

Browse files
committed
Fourth batch of compilation error fixes, FIXES #3404
1 parent 3a3e7af commit f170513

8 files changed

Lines changed: 29 additions & 28 deletions

File tree

server/monitor/src/main/java/org/apache/accumulo/monitor/next/SystemInformation.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -905,7 +905,7 @@ public void processResponse(final ServerId server, final MetricResponse response
905905
captureRecoveriesInProgress(server, response);
906906
FMetric flatbuffer = new FMetric();
907907
FTag tag = new FTag();
908-
switch (response.serverType) {
908+
switch (response.getServerType()) {
909909
case COMPACTOR:
910910
compactors
911911
.computeIfAbsent(response.getResourceGroup(), (rg) -> ConcurrentHashMap.newKeySet())
@@ -1084,13 +1084,13 @@ public void processResponse(final ServerId server, final MetricResponse response
10841084
}
10851085
break;
10861086
default:
1087-
LOG.error("Unhandled server type in fetch metric response: {}", response.serverType);
1087+
LOG.error("Unhandled server type in fetch metric response: {}", response.getServerType());
10881088
break;
10891089
}
10901090
}
10911091

10921092
public void processExternalCompaction(TExternalCompaction tec) {
1093-
var tableId = KeyExtent.fromThrift(tec.getJob().extent).tableId();
1093+
var tableId = KeyExtent.fromThrift(tec.getJob().getExtent()).tableId();
10941094
runningCompactionsPerTable.computeIfAbsent(tableId, t -> new LongAdder()).increment();
10951095
runningCompactionsPerGroup.computeIfAbsent(tec.getGroupName(), t -> new LongAdder())
10961096
.increment();
@@ -1345,7 +1345,7 @@ private void computeAlerts(final List<UpdateTaskFuture> failures,
13451345
ServerId sid = e.getKey();
13461346
MetricResponse mr = e.getValue();
13471347
if (mr != null) {
1348-
List<ByteBuffer> metrics = mr.metrics;
1348+
List<ByteBuffer> metrics = mr.getMetrics();
13491349
if (sid.getType() == ServerId.Type.SCAN_SERVER
13501350
|| sid.getType() == ServerId.Type.TABLET_SERVER) {
13511351
for (ByteBuffer binary : metrics) {

shell/src/main/java/org/apache/accumulo/shell/Shell.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1113,9 +1113,9 @@ private void printConstraintViolationException(ConstraintViolationException cve)
11131113
"Constraint class", "Violation code", "Violation Description"));
11141114
logError(String.format("%" + COL1 + "s-+-%" + COL2 + "s-+-%" + col3 + "s%n", repeat("-", COL1),
11151115
repeat("-", COL2), repeat("-", col3)));
1116-
for (TConstraintViolationSummary cvs : cve.violationSummaries) {
1116+
for (TConstraintViolationSummary cvs : cve.getViolationSummaries()) {
11171117
logError(String.format("%-" + COL1 + "s | %" + COL2 + "d | %-" + col3 + "s%n",
1118-
cvs.constrainClass, cvs.violationCode, cvs.violationDescription));
1118+
cvs.getConstrainClass(), cvs.getViolationCode(), cvs.getViolationDescription()));
11191119
}
11201120
logError(String.format("%" + COL1 + "s-+-%" + COL2 + "s-+-%" + col3 + "s%n", repeat("-", COL1),
11211121
repeat("-", COL2), repeat("-", col3)));

test/src/main/java/org/apache/accumulo/test/CorruptMutationIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ public void testCorruptMutation() throws Exception {
9494

9595
// Simulate data corruption in the serialized mutation
9696
TMutation badMutation = createTMutation("ghi", "z3");
97-
badMutation.entries = -42;
97+
badMutation.setEntries(-42);
9898

9999
// Write some good and bad mutations to the session. The server side will see an error here,
100100
// however since this is a thrift oneway method no exception is expected here. This should

test/src/main/java/org/apache/accumulo/test/ListCompactionsIT.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -123,10 +123,11 @@ public void testListRunningCompactions() throws Exception {
123123
}, 10000);
124124

125125
expectedCompactions.values().forEach(tec -> {
126-
RunningCompactionSummary rcs = compactionsByEcid.get(tec.job.getExternalCompactionId());
126+
RunningCompactionSummary rcs =
127+
compactionsByEcid.get(tec.getJob().getExternalCompactionId());
127128
assertNotNull(rcs);
128129
assertEquals(tec.getJob().getExternalCompactionId(), rcs.getEcid());
129-
assertEquals(tec.groupName, rcs.getGroup().canonical());
130+
assertEquals(tec.getGroupName(), rcs.getGroup().canonical());
130131
assertEquals(tec.getCompactor(), rcs.getAddr());
131132
});
132133

test/src/main/java/org/apache/accumulo/test/TotalQueuedIT.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,7 @@ private long getSyncs(AccumuloClient c) throws Exception {
142142
ThriftUtil.getClient(ThriftClientTypes.TABLET_SERVER,
143143
HostAndPort.fromParts(tserver.getHost(), tserver.getPort()), context);
144144
TabletServerStatus status = client.getTabletServerStatus(null, context.rpcCreds());
145-
return status.syncs;
145+
return status.getSyncs();
146146
}
147147
return 0;
148148
}

test/src/main/java/org/apache/accumulo/test/functional/ZombieTServer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ public TabletServerStatus getTabletServerStatus(TInfo tinfo, TCredentials creden
8484
synchronized (this) {
8585
if (statusCount++ < 1) {
8686
TabletServerStatus result = new TabletServerStatus();
87-
result.tableMap = new HashMap<>();
87+
result.setTableMap(new HashMap<>());
8888
return result;
8989
}
9090
}

test/src/main/thrift-gen-java/org/apache/accumulo/test/rpc/thrift/SimpleThriftService.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1189,7 +1189,7 @@ public static class echoPass_args implements org.apache.thrift.TBase<echoPass_ar
11891189
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new echoPass_argsStandardSchemeFactory();
11901190
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new echoPass_argsTupleSchemeFactory();
11911191

1192-
public @org.apache.thrift.annotation.Nullable java.lang.String value; // required
1192+
private @org.apache.thrift.annotation.Nullable java.lang.String value; // required
11931193

11941194
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11951195
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -1578,7 +1578,7 @@ public static class echoPass_result implements org.apache.thrift.TBase<echoPass_
15781578
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new echoPass_resultStandardSchemeFactory();
15791579
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new echoPass_resultTupleSchemeFactory();
15801580

1581-
public @org.apache.thrift.annotation.Nullable java.lang.String success; // required
1581+
private @org.apache.thrift.annotation.Nullable java.lang.String success; // required
15821582

15831583
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15841584
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -1966,7 +1966,7 @@ public static class onewayPass_args implements org.apache.thrift.TBase<onewayPas
19661966
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new onewayPass_argsStandardSchemeFactory();
19671967
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new onewayPass_argsTupleSchemeFactory();
19681968

1969-
public @org.apache.thrift.annotation.Nullable java.lang.String value; // required
1969+
private @org.apache.thrift.annotation.Nullable java.lang.String value; // required
19701970

19711971
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19721972
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -2355,7 +2355,7 @@ public static class echoFail_args implements org.apache.thrift.TBase<echoFail_ar
23552355
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new echoFail_argsStandardSchemeFactory();
23562356
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new echoFail_argsTupleSchemeFactory();
23572357

2358-
public @org.apache.thrift.annotation.Nullable java.lang.String value; // required
2358+
private @org.apache.thrift.annotation.Nullable java.lang.String value; // required
23592359

23602360
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23612361
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -2744,7 +2744,7 @@ public static class echoFail_result implements org.apache.thrift.TBase<echoFail_
27442744
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new echoFail_resultStandardSchemeFactory();
27452745
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new echoFail_resultTupleSchemeFactory();
27462746

2747-
public @org.apache.thrift.annotation.Nullable java.lang.String success; // required
2747+
private @org.apache.thrift.annotation.Nullable java.lang.String success; // required
27482748

27492749
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27502750
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -3132,7 +3132,7 @@ public static class onewayFail_args implements org.apache.thrift.TBase<onewayFai
31323132
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new onewayFail_argsStandardSchemeFactory();
31333133
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new onewayFail_argsTupleSchemeFactory();
31343134

3135-
public @org.apache.thrift.annotation.Nullable java.lang.String value; // required
3135+
private @org.apache.thrift.annotation.Nullable java.lang.String value; // required
31363136

31373137
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
31383138
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -3521,7 +3521,7 @@ public static class echoRuntimeFail_args implements org.apache.thrift.TBase<echo
35213521
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new echoRuntimeFail_argsStandardSchemeFactory();
35223522
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new echoRuntimeFail_argsTupleSchemeFactory();
35233523

3524-
public @org.apache.thrift.annotation.Nullable java.lang.String value; // required
3524+
private @org.apache.thrift.annotation.Nullable java.lang.String value; // required
35253525

35263526
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
35273527
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -3910,7 +3910,7 @@ public static class echoRuntimeFail_result implements org.apache.thrift.TBase<ec
39103910
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new echoRuntimeFail_resultStandardSchemeFactory();
39113911
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new echoRuntimeFail_resultTupleSchemeFactory();
39123912

3913-
public @org.apache.thrift.annotation.Nullable java.lang.String success; // required
3913+
private @org.apache.thrift.annotation.Nullable java.lang.String success; // required
39143914

39153915
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
39163916
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -4298,7 +4298,7 @@ public static class onewayRuntimeFail_args implements org.apache.thrift.TBase<on
42984298
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new onewayRuntimeFail_argsStandardSchemeFactory();
42994299
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new onewayRuntimeFail_argsTupleSchemeFactory();
43004300

4301-
public @org.apache.thrift.annotation.Nullable java.lang.String value; // required
4301+
private @org.apache.thrift.annotation.Nullable java.lang.String value; // required
43024302

43034303
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
43044304
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
@@ -4687,7 +4687,7 @@ public static class echoPassVoid_args implements org.apache.thrift.TBase<echoPas
46874687
private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new echoPassVoid_argsStandardSchemeFactory();
46884688
private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new echoPassVoid_argsTupleSchemeFactory();
46894689

4690-
public @org.apache.thrift.annotation.Nullable java.lang.String value; // required
4690+
private @org.apache.thrift.annotation.Nullable java.lang.String value; // required
46914691

46924692
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
46934693
public enum _Fields implements org.apache.thrift.TFieldIdEnum {

test/src/test/java/org/apache/accumulo/test/ChaoticLoadBalancerTest.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -58,17 +58,17 @@ static class FakeTServer {
5858
TServerStatus getStatus() {
5959
org.apache.accumulo.core.manager.thrift.TabletServerStatus thriftStatus =
6060
new org.apache.accumulo.core.manager.thrift.TabletServerStatus();
61-
thriftStatus.tableMap = new HashMap<>();
61+
thriftStatus.setTableMap(new HashMap<>());
6262
for (TabletId extent : tablets) {
6363
TableId table = extent.getTable();
64-
TableInfo info = thriftStatus.tableMap.get(table.canonical());
64+
TableInfo info = thriftStatus.getTableMap().get(table.canonical());
6565
if (info == null) {
66-
thriftStatus.tableMap.put(table.canonical(), info = new TableInfo());
66+
thriftStatus.getTableMap().put(table.canonical(), info = new TableInfo());
6767
}
68-
info.onlineTablets++;
69-
info.recs = info.onlineTablets;
70-
info.ingestRate = 123.;
71-
info.queryRate = 456.;
68+
info.setOnlineTablets(info.getOnlineTablets() + 1);
69+
info.setRecs(info.getOnlineTablets());
70+
info.setIngestRate(123.);
71+
info.setQueryRate(456.);
7272
}
7373

7474
return new TServerStatusImpl(thriftStatus);

0 commit comments

Comments
 (0)