Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compilation error. Use new IO API #286

Closed
wants to merge 1 commit into from
Closed
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 @@ -25,7 +25,6 @@

import org.apache.accumulo.core.client.AccumuloClient;
import org.apache.accumulo.core.client.Scanner;
import org.apache.accumulo.core.client.admin.servers.ServerId;
import org.apache.accumulo.core.data.Key;
import org.apache.accumulo.core.data.Range;
import org.apache.accumulo.core.data.Value;
Expand Down Expand Up @@ -61,8 +60,7 @@ public Report runTest(final Environment env) throws Exception {
client.tableOperations().addSplits(TABLE_NAME, getSplits());
client.instanceOperations().waitForBalance();

int totalTabletServers =
client.instanceOperations().getServers(ServerId.Type.TABLET_SERVER).size();
int totalTabletServers = client.instanceOperations().getTabletServers().size();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This getTabletServers() method is currenty deprecated in main and using it here will cause the build to fail. So we should not be going back to the deprecated code. Not sure why but it seems the gh actions build is using an older version of accumulo 4.0-snap.

Locally when I do the following the accumulo-testing build will fail.

git checkout  main
git pull
mvn clean install -PskipQA
 cd ../accumulo-testing/
git checkout fixBuild
mvn clean package -DskipTests

Will see the following errors.

[INFO] --- compiler:3.11.0:compile (default-compile) @ accumulo-testing ---
[INFO] Changes detected - recompiling the module! :source
[INFO] Compiling 207 source files with javac [debug deprecation release 11] to target/classes
[INFO] -------------------------------------------------------------
[WARNING] COMPILATION WARNING : 
[INFO] -------------------------------------------------------------
[WARNING] accumulo-testing/src/main/java/org/apache/accumulo/testing/randomwalk/bulk/SelectiveQueueing.java:[40,50] getTabletServers() in org.apache.accumulo.core.client.admin.InstanceOperations has been deprecated
[WARNING]accumulo-testing/src/main/java/org/apache/accumulo/testing/performance/tests/SplitBalancingPT.java:[63,57] getTabletServers() in org.apache.accumulo.core.client.admin.InstanceOperations has been deprecated
[INFO] 2 warnings 
[INFO] -------------------------------------------------------------
[INFO] -------------------------------------------------------------
[ERROR] COMPILATION ERROR : 
[INFO] -------------------------------------------------------------
[ERROR] accumulo-testing/src/main/java/org/apache/accumulo/testing/randomwalk/bulk/SelectiveQueueing.java: warnings found and -Werror specified
[INFO] 1 error

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Asked about this on slack

https://the-asf.slack.com/archives/CERNB8NDC/p1729614591946599?thread_ts=1729614322.448179&cid=CERNB8NDC

Seems the apache jenkins sever has not built accumulo 4.0.0-snapshot and that is causing the mismatch between the latest commit in accumulo/main and the github build.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ran the build on apache jenkins server and produiced a new accumulo 4.0.0-snapshot jar. Now the latest code is available to accumulo-testing and its building now.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like the build is passing in the accumulo-testing elasticity branch. So maybe this PR should be closed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah should probably close this. Sorry for the trouble, looking at the cause of this problem I should not have merged #284 since the GH build was failing on that PR

int expectedAllocation = NUM_SPLITS / totalTabletServers;
int min = expectedAllocation - MARGIN;
int max = expectedAllocation + MARGIN;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
import java.util.concurrent.ThreadPoolExecutor;

import org.apache.accumulo.core.client.AccumuloClient;
import org.apache.accumulo.core.client.admin.servers.ServerId;
import org.apache.accumulo.testing.randomwalk.RandWalkEnv;
import org.apache.accumulo.testing.randomwalk.State;
import org.slf4j.Logger;
Expand All @@ -38,7 +37,7 @@ public static boolean shouldQueueOperation(State state, RandWalkEnv env) {
final ThreadPoolExecutor pool = (ThreadPoolExecutor) state.get("pool");
long queuedThreads = pool.getTaskCount() - pool.getActiveCount() - pool.getCompletedTaskCount();
final AccumuloClient client = env.getAccumuloClient();
int numTservers = client.instanceOperations().getServers(ServerId.Type.TABLET_SERVER).size();
int numTservers = client.instanceOperations().getTabletServers().size();

if (!shouldQueue(queuedThreads, numTservers)) {
log.info("Not queueing because of " + queuedThreads + " outstanding tasks");
Expand Down
Loading