Skip to content

Commit

Permalink
Merge pull request #20 from NationalSecurityAgency/task/replace-depre…
Browse files Browse the repository at this point in the history
…cated-calls

Replace Deprecated Calls
  • Loading branch information
ivakegg authored Nov 1, 2024
2 parents b4bd6ca + 5b60973 commit f8fea97
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -515,7 +515,7 @@ public UpdateResponse updateAccumulo(UpdateRequest request) {
AuthorizationFailure failure = new AuthorizationFailure();

Optional<Map.Entry<String,String>> tableNameToId = warehouseAccumuloClient.tableOperations().tableIdMap().entrySet().stream()
.filter(entry -> entry.getValue().equals(next.getKey().getTableId().toString())).findAny();
.filter(entry -> entry.getValue().equals(next.getKey().getTable().canonical())).findAny();
String mappedTableName = (tableNameToId.isPresent() ? tableNameToId.get().getKey() : "unknown");
failure.setTableName(new OptionallyEncodedString(mappedTableName));
failure.setEndRow(new OptionallyEncodedString(next.getKey().getEndRow().toString()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ public String getHostPort(AccumuloClient accumuloClient) {
Properties clientProps = accumuloClient.properties();
try (CuratorFramework curator = CuratorFrameworkFactory.newClient(clientProps.getProperty(INSTANCE_ZOOKEEPERS.getKey()), retryPolicy)) {
curator.start();
byte[] bytes = curator.getData().forPath(String.format(MONITOR_HTTP_ADDR, accumuloClient.instanceOperations().getInstanceID()));
byte[] bytes = curator.getData().forPath(String.format(MONITOR_HTTP_ADDR, accumuloClient.instanceOperations().getInstanceId()));
String location = new String(bytes, ENCODING);
if (location.startsWith("http://")) {
URI uri = new URI(location);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ public Properties properties() {
String.format("localhost:%d", ZK_PORT), new RetryOneTime(500))) {
curator.start();
curator.create().creatingParentContainersIfNeeded()
.forPath(String.format(ZK_MONITOR_PATH, accumuloClient.instanceOperations().getInstanceID()), ZK_MONITOR_DATA.getBytes());
.forPath(String.format(ZK_MONITOR_PATH, accumuloClient.instanceOperations().getInstanceId()), ZK_MONITOR_DATA.getBytes());
}
//@formatter:on

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ public Properties properties() {
try (CuratorFramework curator = CuratorFrameworkFactory.newClient(String.format("localhost:%d", ZK_PORT), new RetryOneTime(500))) {
curator.start();
curator.create().creatingParentContainersIfNeeded()
.forPath("/accumulo/" + accumuloClient.instanceOperations().getInstanceID() + "/monitor/http_addr", MONITOR_LOC.getBytes());
.forPath("/accumulo/" + accumuloClient.instanceOperations().getInstanceId() + "/monitor/http_addr", MONITOR_LOC.getBytes());
}
}

Expand Down

0 comments on commit f8fea97

Please sign in to comment.