Commit 2d4edf87 by Ramesh Mani

ATLAS-3581:HBase hook converts qualifiedName to lowercase for namespace, table,…

ATLAS-3581:HBase hook converts qualifiedName to lowercase for namespace, table, column-family and column Signed-off-by: 's avatarRamesh Mani <ramesh.mani@gmail.com>
parent bbbadeaa
......@@ -316,7 +316,7 @@ public class HBaseAtlasHook extends AtlasHook {
if (metadataNamespace == null || nameSpace == null || tableName == null || columnFamily == null) {
return null;
} else {
return String.format(HBASE_COLUMN_FAMILY_QUALIFIED_NAME_FORMAT, nameSpace.toLowerCase(), stripNameSpace(tableName.toLowerCase()), columnFamily.toLowerCase(), metadataNamespace);
return String.format(HBASE_COLUMN_FAMILY_QUALIFIED_NAME_FORMAT, nameSpace, stripNameSpace(tableName), columnFamily, metadataNamespace);
}
}
......@@ -332,7 +332,7 @@ public class HBaseAtlasHook extends AtlasHook {
if (metadataNamespace == null || nameSpace == null || tableName == null) {
return null;
} else {
return String.format(HBASE_TABLE_QUALIFIED_NAME_FORMAT, nameSpace.toLowerCase(), stripNameSpace(tableName.toLowerCase()), metadataNamespace);
return String.format(HBASE_TABLE_QUALIFIED_NAME_FORMAT, nameSpace, stripNameSpace(tableName), metadataNamespace);
}
}
......@@ -347,7 +347,7 @@ public class HBaseAtlasHook extends AtlasHook {
if (metadataNamespace == null || nameSpace == null) {
return null;
} else {
return String.format(HBASE_NAMESPACE_QUALIFIED_NAME, nameSpace.toLowerCase(), metadataNamespace);
return String.format(HBASE_NAMESPACE_QUALIFIED_NAME, nameSpace, metadataNamespace);
}
}
......
......@@ -652,8 +652,8 @@ public class HBaseBridge {
* @return Unique qualified name to identify the Table instance in Atlas.
*/
private static String getColumnFamilyQualifiedName(String metadataNamespace, String nameSpace, String tableName, String columnFamily) {
tableName = stripNameSpace(tableName.toLowerCase());
return String.format(HBASE_COLUMN_FAMILY_QUALIFIED_NAME_FORMAT, nameSpace.toLowerCase(), tableName, columnFamily.toLowerCase(), metadataNamespace);
tableName = stripNameSpace(tableName);
return String.format(HBASE_COLUMN_FAMILY_QUALIFIED_NAME_FORMAT, nameSpace, tableName, columnFamily, metadataNamespace);
}
/**
......@@ -664,8 +664,8 @@ public class HBaseBridge {
* @return Unique qualified name to identify the Table instance in Atlas.
*/
private static String getTableQualifiedName(String metadataNamespace, String nameSpace, String tableName) {
tableName = stripNameSpace(tableName.toLowerCase());
return String.format(HBASE_TABLE_QUALIFIED_NAME_FORMAT, nameSpace.toLowerCase(), tableName, metadataNamespace);
tableName = stripNameSpace(tableName);
return String.format(HBASE_TABLE_QUALIFIED_NAME_FORMAT, nameSpace, tableName, metadataNamespace);
}
/**
......@@ -675,7 +675,7 @@ public class HBaseBridge {
* @return Unique qualified name to identify the HBase NameSpace instance in Atlas.
*/
private static String getNameSpaceQualifiedName(String metadataNamespace, String nameSpace) {
return String.format(HBASE_NAMESPACE_QUALIFIED_NAME, nameSpace.toLowerCase(), metadataNamespace);
return String.format(HBASE_NAMESPACE_QUALIFIED_NAME, nameSpace, metadataNamespace);
}
private static String stripNameSpace(String tableName){
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment