mirror of
https://github.com/datahub-project/datahub.git
synced 2025-12-27 09:58:14 +00:00
update the constant name to HDFS_URN_PREFIX_LEN and put comment
This commit is contained in:
parent
45a2a57715
commit
9552aae34b
@ -41,7 +41,7 @@ public class DatasetRowMapper implements RowMapper<Dataset>
|
||||
public static String DATASET_OWNER_NAME_COLUMN = "owner_name";
|
||||
public static String SCHEMA_HISTORY_ID_COLUMN = "schema_history_id";
|
||||
public static String HDFS_PREFIX = "hdfs";
|
||||
public static int URN_PREFIX_LEN = 7;
|
||||
public static int HDFS_URN_PREFIX_LEN = 7; //for hdfs prefix is hdfs:///, but we need the last slash
|
||||
|
||||
|
||||
@Override
|
||||
@ -103,7 +103,7 @@ public class DatasetRowMapper implements RowMapper<Dataset>
|
||||
if (dataset.urn.substring(0, 4).equalsIgnoreCase(HDFS_PREFIX))
|
||||
{
|
||||
dataset.hdfsBrowserLink = Play.application().configuration().getString(DatasetsDAO.HDFS_BROWSER_URL_KEY) +
|
||||
dataset.urn.substring(URN_PREFIX_LEN);
|
||||
dataset.urn.substring(HDFS_URN_PREFIX_LEN);
|
||||
}
|
||||
}
|
||||
dataset.source = source;
|
||||
|
||||
@ -106,7 +106,7 @@ public class DatasetWithUserRowMapper implements RowMapper<Dataset>
|
||||
if (dataset.urn.substring(0, 4).equalsIgnoreCase(HDFS_PREFIX))
|
||||
{
|
||||
dataset.hdfsBrowserLink = Play.application().configuration().getString(DatasetsDAO.HDFS_BROWSER_URL_KEY) +
|
||||
dataset.urn.substring(DatasetRowMapper.URN_PREFIX_LEN);
|
||||
dataset.urn.substring(DatasetRowMapper.HDFS_URN_PREFIX_LEN);
|
||||
}
|
||||
}
|
||||
dataset.source = source;
|
||||
|
||||
@ -455,7 +455,7 @@ public class DatasetsDAO extends AbstractMySQLOpenSourceDAO
|
||||
if (ds.urn.substring(0, 4).equalsIgnoreCase(DatasetRowMapper.HDFS_PREFIX))
|
||||
{
|
||||
ds.hdfsBrowserLink = Play.application().configuration().getString(HDFS_BROWSER_URL_KEY) +
|
||||
ds.urn.substring(DatasetRowMapper.URN_PREFIX_LEN);
|
||||
ds.urn.substring(DatasetRowMapper.HDFS_URN_PREFIX_LEN);
|
||||
}
|
||||
}
|
||||
if (favoriteId != null && favoriteId > 0)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user