[
https://issues.apache.org/jira/browse/HBASE-8304?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13923220#comment-13923220
]
Jerry He commented on HBASE-8304:
---------------------------------
{code}
+ String srcServiceName = srcFs.getCanonicalServiceName();
+ String desServiceName = desFs.getCanonicalServiceName();
...
+ //If one serviceName is a HA format while the other is a no-HA format,
+ //maybe they are refer to the same FileSystem.
+ //For example, srcFs is "ha-hdfs://nameservices" and desFs is
"hdfs://activeNamenode:port"
+ Set<InetSocketAddress> srcAddrs = getNNAddresses((DistributedFileSystem)
srcFs, conf);
+ Set<InetSocketAddress> desAddrs = getNNAddresses((DistributedFileSystem)
desFs, conf);
+ if (Sets.intersection(srcAddrs, desAddrs).size() > 0) {
+ return true;
{code}
A little unclear about this. Given your example:
//For example, srcFs is "ha-hdfs://nameservices" and desFs is
"hdfs://activeNamenode:port"
If the desFs is HA enabled, then you will get the ''ha-hdfs://" format, right?
If it returns "hdfs://", does it already tell you they are different FS?
It is good JIRA.
I didn't know fs.getCanonicalServiceName() will return "ha-hdfs://nameservices"
in HA case.
> Bulkload fail to remove files if fs.default.name / fs.defaultFS is configured
> without default port.
> ---------------------------------------------------------------------------------------------------
>
> Key: HBASE-8304
> URL: https://issues.apache.org/jira/browse/HBASE-8304
> Project: HBase
> Issue Type: Bug
> Components: HFile, regionserver
> Affects Versions: 0.94.5
> Reporter: Raymond Liu
> Assignee: haosdent
> Labels: bulkloader
> Attachments: HBASE-8304-v2.patch, HBASE-8304-v3.patch,
> HBASE-8304.patch
>
>
> When fs.default.name or fs.defaultFS in hadoop core-site.xml is configured as
> hdfs://ip, and hbase.rootdir is configured as hdfs://ip:port/hbaserootdir
> where port is the hdfs namenode's default port. the bulkload operation will
> not remove the file in bulk output dir. Store::bulkLoadHfile will think
> hdfs:://ip and hdfs:://ip:port as different filesystem and go with copy
> approaching instead of rename.
> The root cause is that hbase master will rewrite fs.default.name/fs.defaultFS
> according to hbase.rootdir when regionserver started, thus, dest fs uri from
> the hregion will not matching src fs uri passed from client.
> any suggestion what is the best approaching to fix this issue?
> I kind of think that we could check for default port if src uri come without
> port info.
--
This message was sent by Atlassian JIRA
(v6.2#6252)