Github user foryou2030 commented on a diff in the pull request:
https://github.com/apache/incubator-carbondata/pull/100#discussion_r76513982
--- Diff:
integration/spark/src/main/scala/org/apache/carbondata/spark/util/GlobalDictionaryUtil.scala
---
@@ -629,22 +631,32 @@ object GlobalDictionaryUtil extends Logging {
// filepath regex, look like "/path/*.dictionary"
if (filePath.getName.startsWith("*")) {
val dictExt = filePath.getName.substring(1)
- val listFiles = filePath.getParentFile.listFiles()
- if (listFiles.exists(file =>
- file.getName.endsWith(dictExt) && file.getSize > 0)) {
- true
+ if (filePath.getParentFile.exists()) {
+ val listFiles = filePath.getParentFile.listFiles()
+ if (listFiles.exists(file =>
+ file.getName.endsWith(dictExt) && file.getSize > 0)) {
+ true
+ } else {
+ logWarning("[ALL_DICTIONARY] No dictionary files found or empty
dictionary files! " +
+ "Won't generate new dictionary.")
+ false
+ }
} else {
- logInfo("No dictionary files found or empty dictionary files! " +
- "Won't generate new dictionary.")
- false
+ throw new FileNotFoundException(
+ "[ALL_DICTIONARY] The given dictionary file path not found!")
}
} else {
- if (filePath.exists() && filePath.getSize > 0) {
- true
+ if (filePath.exists()) {
+ if (filePath.getSize > 0) {
+ true
+ } else {
+ logWarning("[ALL_DICTIONARY] No dictionary files found or empty
dictionary files! " +
+ "Won't generate new dictionary.")
+ false
+ }
} else {
- logInfo("No dictionary files found or empty dictionary files! " +
- "Won't generate new dictionary.")
- false
+ throw new FileNotFoundException(
+ "[ALL_DICTIONARY] The given dictionary file path not found!")
--- End diff --
ok, fixed
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---