[jira] [Commented] (HADOOP-13721) Remove stale method ViewFileSystem#getTrashCanLocation

2016-10-14 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/HADOOP-13721?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15576519#comment-15576519
 ] 

Hudson commented on HADOOP-13721:
-

SUCCESS: Integrated in Jenkins build Hadoop-trunk-Commit #10616 (See 
[https://builds.apache.org/job/Hadoop-trunk-Commit/10616/])
HADOOP-13721. Remove stale method ViewFileSystem#getTrashCanLocation. (wang: 
rev aee538be6c2ab324de4d7834cd3347959272de01)
* (edit) 
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/viewfs/ViewFileSystem.java


> Remove stale method ViewFileSystem#getTrashCanLocation
> --
>
> Key: HADOOP-13721
> URL: https://issues.apache.org/jira/browse/HADOOP-13721
> Project: Hadoop Common
>  Issue Type: Bug
>  Components: viewfs
>Affects Versions: 3.0.0-alpha2
>Reporter: Manoj Govindassamy
>Assignee: Manoj Govindassamy
>Priority: Minor
> Fix For: 3.0.0-alpha2
>
> Attachments: HADOOP-13721.01.patch
>
>
> {{ViewFileSystem}} which extends {{FileSystem}} has a public method 
> {{getTrashCanLocation}} which is neither overridden nor used by anybody. 
> Looks like it existed when the file was created, and also I see the 
> implementation returning homeDirectory which might not be the expected one in 
> cases of {{expunge}}. So, inclined to remove this stale and potentially 
> dangerous method unless anyone has any concerns. 
> {code}
>   public Path getTrashCanLocation(final Path f) throws FileNotFoundException {
> final InodeTree.ResolveResult res = 
>   fsState.resolve(getUriPath(f), true);
> return res.isInternalDir() ? null : 
> res.targetFileSystem.getHomeDirectory();
>   }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org



[jira] [Commented] (HADOOP-13721) Remove stale method ViewFileSystem#getTrashCanLocation

2016-10-14 Thread Andrew Wang (JIRA)

[ 
https://issues.apache.org/jira/browse/HADOOP-13721?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15576482#comment-15576482
 ] 

Andrew Wang commented on HADOOP-13721:
--

Gotcha. Looking at the Shell code, it resolves the child filesystem before 
creating the Trash, and calls getTrashRoot correctly. Emptying is handled 
server-side by each namenode.

LGTM +1 will commit shortly.

> Remove stale method ViewFileSystem#getTrashCanLocation
> --
>
> Key: HADOOP-13721
> URL: https://issues.apache.org/jira/browse/HADOOP-13721
> Project: Hadoop Common
>  Issue Type: Bug
>Affects Versions: 3.0.0-alpha2
>Reporter: Manoj Govindassamy
>Assignee: Manoj Govindassamy
>Priority: Minor
> Attachments: HADOOP-13721.01.patch
>
>
> {{ViewFileSystem}} which extends {{FileSystem}} has a public method 
> {{getTrashCanLocation}} which is neither overridden nor used by anybody. 
> Looks like it existed when the file was created, and also I see the 
> implementation returning homeDirectory which might not be the expected one in 
> cases of {{expunge}}. So, inclined to remove this stale and potentially 
> dangerous method unless anyone has any concerns. 
> {code}
>   public Path getTrashCanLocation(final Path f) throws FileNotFoundException {
> final InodeTree.ResolveResult res = 
>   fsState.resolve(getUriPath(f), true);
> return res.isInternalDir() ? null : 
> res.targetFileSystem.getHomeDirectory();
>   }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org



[jira] [Commented] (HADOOP-13721) Remove stale method ViewFileSystem#getTrashCanLocation

2016-10-14 Thread Manoj Govindassamy (JIRA)

[ 
https://issues.apache.org/jira/browse/HADOOP-13721?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15576172#comment-15576172
 ] 

Manoj Govindassamy commented on HADOOP-13721:
-


{{Expunge}} works with {{ViewFileSystem}}.

The way Expunge works is 
{code}
@Override
protected void processArguments(LinkedList args)
throws IOException {
  FileSystem[] childFileSystems =
  FileSystem.get(getConf()).getChildFileSystems();
  if (null != childFileSystems) {
for (FileSystem fs : childFileSystems) {
  Trash trash = new Trash(fs, getConf());
  trash.expunge();
  trash.checkpoint();
}
  } else {
  ... 
}
{code}

Since {{ViewFileSystem}} implements getChildFileSystems() and exports all the 
mounted file systems, expunge is invoked on the all these mounted filesystems.

{noformat}
manoj@~/work/test/hadev-mg(master)*: hdfs dfs -ls /
Found 4 items
-r-xr-xr-x   - manoj staff  0 2016-10-14 11:30 /nn0
-r-xr-xr-x   - manoj staff  0 2016-10-14 11:30 /nn1
-r-xr-xr-x   - manoj staff  0 2016-10-14 11:30 /nn2
-r-xr-xr-x   - manoj staff  0 2016-10-14 11:30 /nn3
manoj@~/work/test/hadev-mg(master)*: hdfs dfs -ls /nn0
Found 1 items
drwxr-xr-x   - manoj supergroup  0 2016-10-14 11:27 /nn0/user
manoj@~/work/test/hadev-mg(master)*: hdfs dfs -ls -R /nn0
drwxr-xr-x   - manoj supergroup  0 2016-10-14 11:27 /nn0/user
drwxr-xr-x   - manoj supergroup  0 2016-10-14 11:27 /nn0/user/manoj
manoj@~/work/test/hadev-mg(master)*: hdfs dfs -mkdir -p /nn0/delete/test1
manoj@~/work/test/hadev-mg(master)*: hdfs dfs -mkdir -p /nn0/delete/test2
manoj@~/work/test/hadev-mg(master)*: hdfs dfs -ls -R /nn0
drwxr-xr-x   - manoj supergroup  0 2016-10-14 11:31 /nn0/delete
drwxr-xr-x   - manoj supergroup  0 2016-10-14 11:31 /nn0/delete/test1
drwxr-xr-x   - manoj supergroup  0 2016-10-14 11:31 /nn0/delete/test2
drwxr-xr-x   - manoj supergroup  0 2016-10-14 11:27 /nn0/user
drwxr-xr-x   - manoj supergroup  0 2016-10-14 11:27 /nn0/user/manoj
manoj@~/work/test/hadev-mg(master)*: hdfs dfs -rm -r /nn0/delete/test1
manoj@~/work/test/hadev-mg(master)*: hdfs dfs -ls -R /nn0
drwxr-xr-x   - manoj supergroup  0 2016-10-14 11:32 /nn0/delete
drwxr-xr-x   - manoj supergroup  0 2016-10-14 11:31 /nn0/delete/test2
drwxr-xr-x   - manoj supergroup  0 2016-10-14 11:27 /nn0/user
drwxr-xr-x   - manoj supergroup  0 2016-10-14 11:32 /nn0/user/manoj
drwx--   - manoj supergroup  0 2016-10-14 11:32 
/nn0/user/manoj/.Trash
drwx--   - manoj supergroup  0 2016-10-14 11:32 
/nn0/user/manoj/.Trash/Current
drwx--   - manoj supergroup  0 2016-10-14 11:32 
/nn0/user/manoj/.Trash/Current/delete
drwxr-xr-x   - manoj supergroup  0 2016-10-14 11:31 
/nn0/user/manoj/.Trash/Current/delete/test1
manoj@~/work/test/hadev-mg(master)*: hdfs dfs -rm -r -skipTrash 
/nn0/delete/test2
Deleted /nn0/delete/test2
manoj@~/work/test/hadev-mg(master)*: hdfs dfs -ls -R /nn0
drwxr-xr-x   - manoj supergroup  0 2016-10-14 11:33 /nn0/delete
drwxr-xr-x   - manoj supergroup  0 2016-10-14 11:27 /nn0/user
drwxr-xr-x   - manoj supergroup  0 2016-10-14 11:32 /nn0/user/manoj
drwx--   - manoj supergroup  0 2016-10-14 11:32 
/nn0/user/manoj/.Trash
drwx--   - manoj supergroup  0 2016-10-14 11:32 
/nn0/user/manoj/.Trash/Current
drwx--   - manoj supergroup  0 2016-10-14 11:32 
/nn0/user/manoj/.Trash/Current/delete
drwxr-xr-x   - manoj supergroup  0 2016-10-14 11:31 
/nn0/user/manoj/.Trash/Current/delete/test1
manoj@~/work/test/hadev-mg(master)*: hdfs dfs -expunge
manoj@~/work/test/hadev-mg(master)*: hdfs dfs -ls -R /nn0
drwxr-xr-x   - manoj supergroup  0 2016-10-14 11:33 /nn0/delete
drwxr-xr-x   - manoj supergroup  0 2016-10-14 11:27 /nn0/user
drwxr-xr-x   - manoj supergroup  0 2016-10-14 11:32 /nn0/user/manoj
drwx--   - manoj supergroup  0 2016-10-14 11:34 
/nn0/user/manoj/.Trash
drwx--   - manoj supergroup  0 2016-10-14 11:32 
/nn0/user/manoj/.Trash/161014113451
drwx--   - manoj supergroup  0 2016-10-14 11:32 
/nn0/user/manoj/.Trash/161014113451/delete
drwxr-xr-x   - manoj supergroup  0 2016-10-14 11:31 
/nn0/user/manoj/.Trash/161014113451/delete/test1
{noformat}



> Remove stale method ViewFileSystem#getTrashCanLocation
> --
>
> Key: HADOOP-13721
> URL: https://issues.apache.org/jira/browse/HADOOP-13721
> Project: Hadoop Common
>  Issue Type: Bug
>Affects Versions: 3.0.0-alpha2
>Reporter: Manoj Govindassamy
>Assignee: Manoj Govindassamy
>Priority: Minor
> Attachments: HADOOP-13721.01.patch
>
>
> {{ViewFileSystem}} which extends 

[jira] [Commented] (HADOOP-13721) Remove stale method ViewFileSystem#getTrashCanLocation

2016-10-13 Thread Andrew Wang (JIRA)

[ 
https://issues.apache.org/jira/browse/HADOOP-13721?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15573605#comment-15573605
 ] 

Andrew Wang commented on HADOOP-13721:
--

Good find Manoj. This is almost certainly supposed to be getTrashRoot and 
family.

Related question though, does the default getTrashRoot implementation work for 
ViewFileSystem? It seems like we need to defer to the resolved filesystem's 
implementation, since DFS for instance re-implements it to support encryption 
zones.

> Remove stale method ViewFileSystem#getTrashCanLocation
> --
>
> Key: HADOOP-13721
> URL: https://issues.apache.org/jira/browse/HADOOP-13721
> Project: Hadoop Common
>  Issue Type: Bug
>Affects Versions: 3.0.0-alpha2
>Reporter: Manoj Govindassamy
>Assignee: Manoj Govindassamy
>Priority: Minor
> Attachments: HADOOP-13721.01.patch
>
>
> {{ViewFileSystem}} which extends {{FileSystem}} has a public method 
> {{getTrashCanLocation}} which is neither overridden nor used by anybody. 
> Looks like it existed when the file was created, and also I see the 
> implementation returning homeDirectory which might not be the expected one in 
> cases of {{expunge}}. So, inclined to remove this stale and potentially 
> dangerous method unless anyone has any concerns. 
> {code}
>   public Path getTrashCanLocation(final Path f) throws FileNotFoundException {
> final InodeTree.ResolveResult res = 
>   fsState.resolve(getUriPath(f), true);
> return res.isInternalDir() ? null : 
> res.targetFileSystem.getHomeDirectory();
>   }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

-
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org



[jira] [Commented] (HADOOP-13721) Remove stale method ViewFileSystem#getTrashCanLocation

2016-10-13 Thread Hadoop QA (JIRA)

[ 
https://issues.apache.org/jira/browse/HADOOP-13721?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15573456#comment-15573456
 ] 

Hadoop QA commented on HADOOP-13721:


| (x) *{color:red}-1 overall{color}* |
\\
\\
|| Vote || Subsystem || Runtime || Comment ||
| {color:blue}0{color} | {color:blue} reexec {color} | {color:blue}  0m 
18s{color} | {color:blue} Docker mode activated. {color} |
| {color:green}+1{color} | {color:green} @author {color} | {color:green}  0m  
0s{color} | {color:green} The patch does not contain any @author tags. {color} |
| {color:red}-1{color} | {color:red} test4tests {color} | {color:red}  0m  
0s{color} | {color:red} The patch doesn't appear to include any new or modified 
tests. Please justify why no new tests are needed for this patch. Also please 
list what manual steps were performed to verify this patch. {color} |
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green}  7m 
27s{color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  7m 
48s{color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  0m 
26s{color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} mvnsite {color} | {color:green}  1m  
7s{color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} mvneclipse {color} | {color:green}  0m 
13s{color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} findbugs {color} | {color:green}  1m 
33s{color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  0m 
46s{color} | {color:green} trunk passed {color} |
| {color:green}+1{color} | {color:green} mvninstall {color} | {color:green}  0m 
45s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} compile {color} | {color:green}  7m 
28s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javac {color} | {color:green}  7m 
28s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} checkstyle {color} | {color:green}  0m 
27s{color} | {color:green} hadoop-common-project/hadoop-common: The patch 
generated 0 new + 61 unchanged - 1 fixed = 61 total (was 62) {color} |
| {color:green}+1{color} | {color:green} mvnsite {color} | {color:green}  0m 
59s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} mvneclipse {color} | {color:green}  0m 
14s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} whitespace {color} | {color:green}  0m 
 0s{color} | {color:green} The patch has no whitespace issues. {color} |
| {color:green}+1{color} | {color:green} findbugs {color} | {color:green}  1m 
31s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} javadoc {color} | {color:green}  0m 
42s{color} | {color:green} the patch passed {color} |
| {color:green}+1{color} | {color:green} unit {color} | {color:green}  8m 
16s{color} | {color:green} hadoop-common in the patch passed. {color} |
| {color:green}+1{color} | {color:green} asflicense {color} | {color:green}  0m 
24s{color} | {color:green} The patch does not generate ASF License warnings. 
{color} |
| {color:black}{color} | {color:black} {color} | {color:black} 41m 50s{color} | 
{color:black} {color} |
\\
\\
|| Subsystem || Report/Notes ||
| Docker |  Image:yetus/hadoop:9560f25 |
| JIRA Issue | HADOOP-13721 |
| JIRA Patch URL | 
https://issues.apache.org/jira/secure/attachment/12833212/HADOOP-13721.01.patch 
|
| Optional Tests |  asflicense  compile  javac  javadoc  mvninstall  mvnsite  
unit  findbugs  checkstyle  |
| uname | Linux a921af304247 3.13.0-36-lowlatency #63-Ubuntu SMP PREEMPT Wed 
Sep 3 21:56:12 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux |
| Build tool | maven |
| Personality | /testptch/hadoop/patchprocess/precommit/personality/provided.sh 
|
| git revision | trunk / 0a85d07 |
| Default Java | 1.8.0_101 |
| findbugs | v3.0.0 |
|  Test Results | 
https://builds.apache.org/job/PreCommit-HADOOP-Build/10775/testReport/ |
| modules | C: hadoop-common-project/hadoop-common U: 
hadoop-common-project/hadoop-common |
| Console output | 
https://builds.apache.org/job/PreCommit-HADOOP-Build/10775/console |
| Powered by | Apache Yetus 0.4.0-SNAPSHOT   http://yetus.apache.org |


This message was automatically generated.



> Remove stale method ViewFileSystem#getTrashCanLocation
> --
>
> Key: HADOOP-13721
> URL: https://issues.apache.org/jira/browse/HADOOP-13721
> Project: Hadoop Common
>  Issue Type: Bug
>Affects Versions: 3.0.0-alpha2
>Reporter: Manoj Govindassamy
>Assignee: Manoj