New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HIVE-24187: Handle _files creation for HA config with same nameservic… #1515
Conversation
…e name on source and destination
@@ -522,6 +522,14 @@ private static void populateLlapDaemonVarsSet(Set<String> llapDaemonVarsSetLocal | |||
REPLCMINTERVAL("hive.repl.cm.interval","3600s", | |||
new TimeValidator(TimeUnit.SECONDS), | |||
"Inteval for cmroot cleanup thread."), | |||
REPL_HA_DATAPATH_REPLACE_REMOTE_NAMESERVICE("hive.repl.ha.datapath.replace.remote.nameservice", false, | |||
"When HDFS is HA enabled and both source and target clusters are configured with same nameservice names," + | |||
"enable this flag and provide a "), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sentence is incomplete
/** | ||
* Given a ReplChangeManger's encoded uri, replaces the namespace and returns the modified encoded uri. | ||
*/ | ||
public static String replaceNameSpaceInEncodedURI(String cmEncodedURI, HiveConf hiveConf) throws SemanticException { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replace name service?
if ((fileChecksum != null) && (cmroot != null)) { | ||
encodedUri = encodedUri + URI_FRAGMENT_SEPARATOR + fileChecksum + URI_FRAGMENT_SEPARATOR + cmroot; | ||
} else { | ||
encodedUri = encodedUri + URI_FRAGMENT_SEPARATOR + URI_FRAGMENT_SEPARATOR; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we have 2 URI_FRAGMENT_SEPARATOR
encodedUri = encodedUri + URI_FRAGMENT_SEPARATOR + URI_FRAGMENT_SEPARATOR; | ||
} | ||
encodedUri = encodedUri + URI_FRAGMENT_SEPARATOR + ((encodedSubDir != null) ? encodedSubDir : ""); | ||
if (LOG.isDebugEnabled()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this check?
@@ -424,6 +424,20 @@ public String encodeFileUri(String fileUriStr, String fileChecksum, String encod | |||
return encodedUri; | |||
} | |||
|
|||
public static String encodeFileUri(String fileUriStr, String fileChecksum, String cmroot, String encodedSubDir) { | |||
String encodedUri = fileUriStr; | |||
if ((fileChecksum != null) && (cmroot != null)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
empty check not needed?
@@ -1963,4 +2062,12 @@ private void setupUDFJarOnHDFS(Path identityUdfLocalPath, Path identityUdfHdfsPa | |||
FileSystem fs = primary.miniDFSCluster.getFileSystem(); | |||
fs.copyFromLocalFile(identityUdfLocalPath, identityUdfHdfsPath); | |||
} | |||
|
|||
private List<String> getHdfsNamespaceClause() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
replace with nameservice
…e name on source and destination
} | ||
|
||
@Test | ||
public void testHdfsNamespaceWithDataCopy() throws Throwable { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nameservice
…e name on source and destination
…e name on source and destination
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. |
…e name on source and destination
What changes were proposed in this pull request?
Why are the changes needed?
Does this PR introduce any user-facing change?
How was this patch tested?