/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package hdfs.jsr203.attribute;

import java.io.IOException;
import java.nio.file.attribute.FileOwnerAttributeView;
import java.nio.file.attribute.UserPrincipal;

public class HadoopFileOwnerAttributeView implements FileOwnerAttributeView {

	@Override
	public String name() {
		return "owner";
	}

	@Override
	public UserPrincipal getOwner() throws IOException {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public void setOwner(UserPrincipal owner) throws IOException {
		// TODO Auto-generated method stub

	}

}

@@ -809,16 +809,48 @@
 ibute;%0A%0A
+import hdfs.jsr203.HadoopPath;%0A%0A
 import j
@@ -974,247 +974,738 @@
 al;%0A
-%0Apublic class HadoopFileOwnerAttributeView implements FileOwnerAttributeView %7B%0A%0A%09@Override%0A%09public String name() %7B%0A%09%09return %22owner%22;%0A%09%7D%0A%0A%09@Override%0A%09public UserPrincipal getOwner() throws IOException %7B%0A%09%09// TODO Auto-generated method stub%0A
+import java.nio.file.attribute.UserPrincipalLookupService;%0A%0Aimport org.apache.hadoop.fs.FileStatus;%0A%0Apublic class HadoopFileOwnerAttributeView implements FileOwnerAttributeView %7B%0A%09%0A%09private final HadoopPath path;%0A%0A%09public HadoopFileOwnerAttributeView(HadoopPath path) %7B%0A%09%09this.path = path;%0A%09%7D%0A%0A%09@Override%0A%09public String name() %7B%0A%09%09return %22owner%22;%0A%09%7D%0A%0A%09@Override%0A%09public UserPrincipal getOwner() throws IOException %7B%0A%09%09try %7B%0A%09%09%09UserPrincipalLookupService ls = this.path.getFileSystem().getUserPrincipalLookupService();%0A%09%09%09FileStatus fileStatus = path.getFileSystem().getHDFS().getFileStatus(path.getRawResolvedPath());%0A%09%09%09return ls.lookupPrincipalByName(fileStatus.getOwner());%0A%09%09%7D catch (IOException e) %7B%0A%09%09%09e.printStackTrace();%0A%09
 %09%09re
@@ -1715,16 +1715,20 @@
 n null;%0A
+%09%09%7D%0A
 %09%7D%0A%0A%09@Ov
@@ -1812,35 +1812,74 @@
 ODO 
-Auto-generated method stub%0A
+manage change of owner%0A%09%09throw new IOException(%22Not implemented%22);
 %0A%09%7D%0A

Implement "owner" view.