File tree Expand file tree Collapse file tree 1 file changed +4
-2
lines changed
fluss-client/src/main/java/org/apache/fluss/client/table/scanner/log Expand file tree Collapse file tree 1 file changed +4
-2
lines changed Original file line number Diff line number Diff line change 6565import java .util .HashSet ;
6666import java .util .List ;
6767import java .util .Map ;
68+ import java .util .Optional ;
6869import java .util .Set ;
6970import java .util .stream .Collectors ;
7071
@@ -502,8 +503,9 @@ private List<TableBucket> fetchableBuckets() {
502503 }
503504
504505 private Integer getTableBucketLeader (TableBucket tableBucket ) {
505- if (metadataUpdater .getBucketLocation (tableBucket ).isPresent ()) {
506- BucketLocation bucketLocation = metadataUpdater .getBucketLocation (tableBucket ).get ();
506+ Optional <BucketLocation > bucketLocationOpt = metadataUpdater .getBucketLocation (tableBucket );
507+ if (bucketLocationOpt .isPresent ()) {
508+ BucketLocation bucketLocation = bucketLocationOpt .get ();
507509 if (bucketLocation .getLeader () != null ) {
508510 return bucketLocation .getLeader ();
509511 }
You can’t perform that action at this time.
0 commit comments