morningman commented on code in PR #46398:
URL: https://github.com/apache/doris/pull/46398#discussion_r1909755743
##########
fe/fe-common/src/main/java/org/apache/doris/common/security/authentication/HadoopAuthenticator.java:
##########
@@ -31,6 +32,12 @@ default <T> T doAs(PrivilegedExceptionAction<T> action)
throws IOException {
return getUGI().doAs(action);
} catch (InterruptedException e) {
throw new IOException(e);
+ } catch (UndeclaredThrowableException e) {
+ if (e.getCause() instanceof RuntimeException) {
Review Comment:
You can use Util.getRootCause(e)
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/ExternalCatalog.java:
##########
@@ -156,6 +158,7 @@ public abstract class ExternalCatalog
protected Optional<Boolean> useMetaCache = Optional.empty();
protected MetaCache<ExternalDatabase<? extends ExternalTable>> metaCache;
protected PreExecutionAuthenticator preExecutionAuthenticator;
+ protected ThreadPoolExecutor threadPool;
Review Comment:
use an explicit name. `threadPool` is too common
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/source/IcebergScanNode.java:
##########
@@ -308,6 +361,11 @@ private List<Split> doGetSplits(int numBackends) throws
UserException {
return splits;
}
+ @Override
+ public boolean isBatchMode() {
+ return sessionVariable.getNumPartitionsInBatchMode() > 0;
Review Comment:
find a better to to determine using batch mode or not
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/SplitAssignment.java:
##########
@@ -167,11 +172,26 @@ public void finishSchedule() {
}
public void stop() {
+ if (isStop()) {
Review Comment:
```suggestion
if (isStopped()) {
```
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/SplitAssignment.java:
##########
@@ -167,11 +172,26 @@ public void finishSchedule() {
}
public void stop() {
+ if (isStop()) {
+ return;
+ }
isStop.set(true);
Review Comment:
```suggestion
isStopped.set(true);
```
##########
fe/fe-core/src/main/java/org/apache/doris/datasource/iceberg/source/IcebergScanNode.java:
##########
@@ -213,16 +254,16 @@ private List<Split> doGetSplits(int numBackends) throws
UserException {
this.pushdownIcebergPredicates.add(predicate.toString());
}
- // get splits
- List<Split> splits = new ArrayList<>();
- int formatVersion = ((BaseTable)
icebergTable).operations().current().formatVersion();
- HashSet<String> partitionPathSet = new HashSet<>();
- boolean isPartitionedTable = icebergTable.spec().isPartitioned();
+ scan = scan.planWith(source.getCatalog().getThreadPool());
+
+ return scan;
+ }
- long realFileSplitSize = getRealFileSplitSize(0);
- CloseableIterable<FileScanTask> fileScanTasks = null;
+ public CloseableIterable<FileScanTask> planFileScanTask(TableScan scan) {
Review Comment:
```suggestion
private CloseableIterable<FileScanTask> planFileScanTask(TableScan scan)
{
```
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]