Skip to content

Commit

Permalink
Dev 1.10.0 bug fix (#697)
Browse files Browse the repository at this point in the history
* Code Optimization

* Code Optimization

* Code Optimization

* Code Optimization

* fix miss code

* New interface: Retrieve data source list based on type name

* New interface: Retrieve data source list based on type name

* bug   fix

* bug   fix

---------

Co-authored-by: “v_kkhuang” <“420895376@qq.com”>
  • Loading branch information
v-kkhuang and “v_kkhuang” authored Dec 31, 2024
1 parent f2710b4 commit d68e60d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@ private MdqTablePartitionStatisticInfoVO create(String path) throws IOException
}

private Date getTableModificationTime(String tableLocation) throws IOException {
if (StringUtils.isNotBlank(tableLocation)) {
if (StringUtils.isNotBlank(tableLocation) && getRootHdfs().exists(new Path(tableLocation))) {
FileStatus tableFile = getFileStatus(tableLocation);
return new Date(tableFile.getModificationTime());
}
Expand All @@ -360,7 +360,7 @@ private Date getTableModificationTime(String tableLocation) throws IOException {

private int getPartitionsNum(String tableLocation) throws IOException {
int partitionsNum = 0;
if (StringUtils.isNotBlank(tableLocation)) {
if (StringUtils.isNotBlank(tableLocation) && getRootHdfs().exists(new Path(tableLocation))) {
FileStatus tableFile = getFileStatus(tableLocation);
partitionsNum = getRootHdfs().listStatus(tableFile.getPath()).length;
}
Expand Down

0 comments on commit d68e60d

Please sign in to comment.