Skip to content

Conversation

@hehuiyuan
Copy link
Contributor

Change Logs

org.apache.flink.runtime.rest.handler.RestHandlerException: The main method caused an error: java.util.NoSuchElementException: No value present in Option
	at org.apache.hudi.common.util.Option.get(Option.java:89)
	at org.apache.hudi.table.HoodieTableSource.buildFileIndex(HoodieTableSource.java:341)
	at org.apache.hudi.table.HoodieTableSource.getBatchInputFormat(HoodieTableSource.java:381)
	at org.apache.hudi.table.HoodieTableSource.getInputFormat(HoodieTableSource.java:366)
	at org.apache.hudi.table.HoodieTableSource.getInputFormat(HoodieTableSource.java:361)
	at org.apache.hudi.table.HoodieTableSource$1.produceDataStream(HoodieTableSource.java:198)
	at org.apache.flink.table.planner.plan.nodes.exec.common.CommonExecTableSourceScan.translateToPlanInternal(CommonExecTableSourceScan.java:106)
	at org.apache.flink.table.planner.plan.nodes.exec.batch.BatchExecTableSourceScan.translateToPlanInternal(BatchExecTableSourceScan.java:49)
	at org.apache.flink.table.planner.plan.nodes.exec.ExecNodeBase.translateToPlan(ExecNodeBase.java:134)
	at org.apache.flink.table.planner.plan.nodes.exec.ExecEdge.translateToPlan(ExecEdge.java:250)

The exception is not clean enough, we can point out the exception.

metaClient.getCommitsAndCompactionTimeline().filterCompletedAndCompactionInstants(), fileStatuses);
if (!fsView.getLastInstant().isPresent()) {
throw new HoodieException("No completed instant found for table : " + conf.getString(FlinkOptions.TABLE_NAME));
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of throwing exception, can we returns a empty list so the query result is just empty?

@hehuiyuan hehuiyuan force-pushed the master-describe-no-commit-instant branch from b40ae1b to 5d1b0af Compare August 1, 2023 06:47
@hehuiyuan hehuiyuan changed the title Fix to explain the no commit instant exception when batch read [HUDI-6624]Fix to explain the no commit instant exception when batch read Aug 1, 2023
@hehuiyuan hehuiyuan changed the title [HUDI-6624]Fix to explain the no commit instant exception when batch read [HUDI-6624]Fix to return a empty list when there is no commit instant to read Aug 1, 2023
@hudi-bot
Copy link
Collaborator

hudi-bot commented Aug 1, 2023

CI report:

Bot commands @hudi-bot supports the following commands:
  • @hudi-bot run azure re-run the last Azure build

@danny0405 danny0405 merged commit a495c16 into apache:master Aug 2, 2023
zhangyue19921010 pushed a commit to zhangyue19921010/hudi that referenced this pull request Aug 31, 2023
…he#32)

* [HUDI-6624] Fix to return Empty when there is no commit instant (apache#9325)

* [HUDI-6358] Fix flink payload merger with deletes (apache#8935)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants