Skip to content

Commit

Permalink
no meta
Browse files Browse the repository at this point in the history
  • Loading branch information
Baunsgaard committed Oct 21, 2024
1 parent c5eb6a0 commit f049dd1
Showing 1 changed file with 22 additions and 22 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -710,28 +710,28 @@ public FrameBlock getMetaData(FrameBlock meta, int k) {
return _meta;
if(meta == null)
meta = new FrameBlock(_columnEncoders.size(), ValueType.STRING);
this.allocateMetaData(meta);
if(k > 1) {
ExecutorService pool = CommonThreadPool.get(k);
try {
ArrayList<ColumnMetaDataTask<? extends ColumnEncoder>> tasks = new ArrayList<>();
for(ColumnEncoder columnEncoder : _columnEncoders)
tasks.add(new ColumnMetaDataTask<>(columnEncoder, meta));
List<Future<Object>> taskret = pool.invokeAll(tasks);
for(Future<Object> task : taskret)
task.get();
}
catch(Exception ex) {
throw new DMLRuntimeException(ex);
}
finally {
pool.shutdown();
}
}
else {
for(ColumnEncoder columnEncoder : _columnEncoders)
columnEncoder.getMetaData(meta);
}
// this.allocateMetaData(meta);
// if(k > 1) {
// ExecutorService pool = CommonThreadPool.get(k);
// try {
// ArrayList<ColumnMetaDataTask<? extends ColumnEncoder>> tasks = new ArrayList<>();
// for(ColumnEncoder columnEncoder : _columnEncoders)
// tasks.add(new ColumnMetaDataTask<>(columnEncoder, meta));
// List<Future<Object>> taskret = pool.invokeAll(tasks);
// for(Future<Object> task : taskret)
// task.get();
// }
// catch(Exception ex) {
// throw new DMLRuntimeException(ex);
// }
// finally {
// pool.shutdown();
// }
// }
// else {
// for(ColumnEncoder columnEncoder : _columnEncoders)
// columnEncoder.getMetaData(meta);
// }

// _columnEncoders.stream().parallel().forEach(columnEncoder ->
// columnEncoder.getMetaData(meta));
Expand Down

0 comments on commit f049dd1

Please sign in to comment.