keith-turner commented on code in PR #3401:
URL: https://github.com/apache/accumulo/pull/3401#discussion_r1198061983
##########
core/src/main/java/org/apache/accumulo/core/clientImpl/bulk/BulkImport.java:
##########
@@ -548,22 +548,22 @@ public SortedMap<KeyExtent,Bulk.Files>
computeFileToTabletMappings(FileSystem fs
context.instanceOperations().getSystemConfiguration(), tableProps,
tableId);
for (FileStatus fileStatus : files) {
- Path filePath = fileStatus.getPath();
+ UnassignedTabletFile file = UnassignedTabletFile.of(fs,
fileStatus.getPath());
CompletableFuture<Map<KeyExtent,Bulk.FileInfo>> future =
CompletableFuture.supplyAsync(() -> {
try {
long t1 = System.currentTimeMillis();
List<KeyExtent> extents =
- findOverlappingTablets(context, extentCache, filePath, fs,
fileLensCache, cs);
+ findOverlappingTablets(context, extentCache, file, fs,
fileLensCache, cs);
// make sure file isn't going to too many tablets
- checkTabletCount(maxTablets, extents.size(), filePath.toString());
- Map<KeyExtent,Long> estSizes =
estimateSizes(context.getConfiguration(), filePath,
+ checkTabletCount(maxTablets, extents.size(), file.toString());
+ Map<KeyExtent,Long> estSizes =
estimateSizes(context.getConfiguration(), file,
fileStatus.getLen(), extents, fs, fileLensCache, cs);
Map<KeyExtent,Bulk.FileInfo> pathLocations = new HashMap<>();
for (KeyExtent ke : extents) {
- pathLocations.put(ke, new Bulk.FileInfo(filePath,
estSizes.getOrDefault(ke, 0L)));
+ pathLocations.put(ke, new Bulk.FileInfo(file.getPath(),
estSizes.getOrDefault(ke, 0L)));
Review Comment:
Looked into passing TabletFile to FileInfo. FileInfo is used for
serialization, so internally it needs a string. Could possibly pass the tablet
file obj have it do the conversion in the constructor.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]