Skip to content

Commit c56cc6a

Browse files
author
jbai
committed
update the tract pathinfo method since db content changed
1 parent 026311b commit c56cc6a

File tree

1 file changed

+2
-31
lines changed

1 file changed

+2
-31
lines changed

web/app/utils/Lineage.java

Lines changed: 2 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -45,38 +45,9 @@ public static LineagePathInfo convertFromURN(String urn)
4545
pathInfo.storageType = storageType;
4646
if (StringUtils.isNotBlank(storageType))
4747
{
48-
if (storageType.equalsIgnoreCase("hdfs"))
48+
if (pathArray.length > 1 && StringUtils.isNotBlank(pathArray[1]))
4949
{
50-
if (pathArray.length > 1 && StringUtils.isNotBlank(pathArray[1]))
51-
{
52-
pathInfo.filePath = "/" + pathArray[1];
53-
}
54-
}
55-
else if (storageType.equalsIgnoreCase("teradata"))
56-
{
57-
if (pathArray.length > 1 && StringUtils.isNotBlank(pathArray[1]))
58-
{
59-
int index = pathArray[1].indexOf("/");
60-
if (index != -1)
61-
{
62-
pathInfo.schemaName = pathArray[1].substring(0, index);
63-
pathInfo.filePath = pathArray[1].substring(index+1);
64-
}
65-
}
66-
}
67-
else if (storageType.equalsIgnoreCase("nas"))
68-
{
69-
if (pathArray.length > 1 && StringUtils.isNotBlank(pathArray[1]))
70-
{
71-
pathInfo.filePath = "/" + pathArray[1];
72-
}
73-
}
74-
else if (storageType.equalsIgnoreCase("hive"))
75-
{
76-
if (pathArray.length > 1 && StringUtils.isNotBlank(pathArray[1]))
77-
{
78-
pathInfo.filePath = "/" + pathArray[1];
79-
}
50+
pathInfo.filePath = "/" + pathArray[1];
8051
}
8152
else
8253
{

0 commit comments

Comments
 (0)