Skip to content

Conversation

@maheshk114
Copy link
Contributor

//method in HiveMetaStoreClient
REPL_EVENTS_MISSING_IN_METASTORE(20017, "Notification events are missing in the meta store."),

REPL_SOURCE_PATH_NOT_VALID(20018, "Target database is bootstrapped from some other path."),
Copy link
Contributor

Choose a reason for hiding this comment

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

Conflicting error name and message. Source path usually refers to source data path not dump path. Also, here the path is valid but couldn't perform bootstrap with it.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

changed to REPL_BOOTSTRAP_LOAD_PATH_NOT_VALID

REPL_SOURCE_PATH_NOT_VALID(20018, "Target database is bootstrapped from some other path."),
REPL_FILE_MISSING_FROM_SRC_AND_CM_PATH(20019, "File is missing from both source and cm path."),
REPL_LOAD_PATH_NOT_FOUND(20020, "Load path does not exist."),
REPL_DATABASE_IS_NOT_SOURCE_OF_REPLICATION(20021, "Source of replication is not set in the database properties."),
Copy link
Contributor

Choose a reason for hiding this comment

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

Shall put the property key(repl.source.for) in the error message.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

source of replication is not set means either empty to null ..so can not put the value

SPARK_GET_JOB_INFO_INTERRUPTED(30045, "Spark job was interrupted while getting job info"),
SPARK_GET_JOB_INFO_EXECUTIONERROR(30046, "Spark job failed in execution while getting job info due to exception {0}"),

REPL_FILE_SYSTEM_RETRY(30047, "Replication file system retry expired."),
Copy link
Contributor

Choose a reason for hiding this comment

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

REPL_FILE_SYSTEM_RETRY is not clear. What do you mean by file system retry?
it must REPL_DATA_COPY_RETRY_ERROR. Also, the message says "retry expired" which also sounds odd.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

can change to file system operation ..as it can be read or write

LOG.error(StringUtils.stringifyException(e));
setException(e);
return (1);
return ErrorMsg.getErrorMsg(e.getMessage()).getErrorCode();
Copy link
Contributor

Choose a reason for hiding this comment

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

There are few return statements inside try block without throwing exception. Do we need to return error code there as well?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

currently only very few scenarios are covered ..in the followup jira need to add all other condition

if (ReplChangeManager.isSourceOfReplication(database)) {
LOG.error("Cannot load database " + dbName +
" as it is a source of replication");
throw new SemanticException(ErrorMsg.REPL_TARGET_IS_THE_SOURCE_OF_REPLICATION.getMsg());
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need to fail for this case? Isn't it enough to ensure, we don't overwrite this property when we load?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

when its already a source we should not load to it

Copy link
Contributor Author

Choose a reason for hiding this comment

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

remove this error code

if (!pathList.isEmpty()) {
LOG.error("File copy failed even after several attempts. Files list: " + pathList);
throw new IOException("File copy failed even after several attempts.");
throw new IOException(ErrorMsg.REPL_FILE_SYSTEM_RETRY.getMsg());
Copy link
Contributor

Choose a reason for hiding this comment

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

This is File copy error not file system retry case.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

will be changed to file system operation error

+ "Also, bootstrap the system again to get back the consistent replicated state.",
nextEventId, e.getEventId());
throw new IllegalStateException("Notification events are missing.");
throw new IllegalStateException(REPL_EVENTS_MISSING_IN_METASTORE);
Copy link
Contributor

Choose a reason for hiding this comment

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

Even this is non-recoverable error. So, shouldn't this be FatalException?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

need not be ..

private final ClientCapabilities version;

//copied from ErrorMsg.java
private static final String REPL_EVENTS_MISSING_IN_METASTORE = "Notification events are missing in the meta store.";
Copy link
Contributor

Choose a reason for hiding this comment

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

Why do we need this msg same as from ErrorMsg?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

as error code is hashed with error message

@github-actions
Copy link

This pull request has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
Feel free to reach out on the dev@hive.apache.org list if the patch is in need of reviews.

@github-actions github-actions bot added the stale label Jun 14, 2020
@github-actions github-actions bot closed this Jun 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants