[ https://issues.apache.org/jira/browse/HDFS-15916?focusedWorklogId=602193&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-602193 ]
ASF GitHub Bot logged work on HDFS-15916: ----------------------------------------- Author: ASF GitHub Bot Created on: 26/May/21 08:33 Start Date: 26/May/21 08:33 Worklog Time Spent: 10m Work Description: jojochuang commented on a change in pull request #3054: URL: https://github.com/apache/hadoop/pull/3054#discussion_r639515184 ########## File path: hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java ########## @@ -2314,8 +2315,15 @@ private SnapshotDiffReport getSnapshotDiffReportInternal( List<DiffReportListingEntry> deletedList = new ChunkedArrayList<>(); SnapshotDiffReportListing report; do { - report = dfs.getSnapshotDiffReportListing(snapshotDir, fromSnapshot, - toSnapshot, startPath, index); + try { + report = dfs.getSnapshotDiffReportListing(snapshotDir, fromSnapshot, + toSnapshot, startPath, index); + } catch (RpcNoSuchMethodException e) { + // In case the server doesn't support getSnapshotDiffReportListing, + // fallback to getSnapshotDiffReport. + DFSClient.LOG.warn("Falling back to getSnapshotDiffReport {}", e.getMessage()); Review comment: Had to use DFSClient.LOG instead of FileSystem.LOG because FileSystem in 3.3 uses commons-logging, not slf4, and does not compile. DFSClient.LOG uses slf4j. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 602193) Time Spent: 1h (was: 50m) > DistCp: Backward compatibility: Distcp fails from Hadoop 3 to Hadoop 2 for > snapshotdiff > --------------------------------------------------------------------------------------- > > Key: HDFS-15916 > URL: https://issues.apache.org/jira/browse/HDFS-15916 > Project: Hadoop HDFS > Issue Type: Bug > Components: distcp > Affects Versions: 3.2.2 > Reporter: Srinivasu Majeti > Assignee: Ayush Saxena > Priority: Major > Labels: pull-request-available > Fix For: 3.4.0 > > Time Spent: 1h > Remaining Estimate: 0h > > Looks like when using distcp diff options between two snapshots from a hadoop > 3 cluster to hadoop 2 cluster , we get below exception and seems to be break > backward compatibility due to new API introduction > getSnapshotDiffReportListing. > > {code:java} > hadoop distcp -diff s1 s2 -update src_cluster_path dst_cluster_path > org.apache.hadoop.ipc.RemoteException(org.apache.hadoop.ipc.RpcNoSuchMethodException): > Unknown method getSnapshotDiffReportListing called on > org.apache.hadoop.hdfs.protocol.ClientProtocol protocol > {code} > > -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: hdfs-issues-unsubscr...@hadoop.apache.org For additional commands, e-mail: hdfs-issues-h...@hadoop.apache.org