You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by jx...@apache.org on 2013/12/18 01:01:01 UTC
svn commit: r1551770 -
/hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/fs/HFileSystem.java
Author: jxiang
Date: Wed Dec 18 00:01:00 2013
New Revision: 1551770
URL: http://svn.apache.org/r1551770
Log:
HBASE-10159 Replaced deprecated interface Closeable
Modified:
hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/fs/HFileSystem.java
Modified: hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/fs/HFileSystem.java
URL: http://svn.apache.org/viewvc/hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/fs/HFileSystem.java?rev=1551770&r1=1551769&r2=1551770&view=diff
==============================================================================
--- hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/fs/HFileSystem.java (original)
+++ hbase/branches/0.98/hbase-server/src/main/java/org/apache/hadoop/hbase/fs/HFileSystem.java Wed Dec 18 00:01:00 2013
@@ -20,6 +20,7 @@
package org.apache.hadoop.hbase.fs;
+import java.io.Closeable;
import java.io.IOException;
import java.lang.reflect.Field;
import java.lang.reflect.InvocationHandler;
@@ -46,7 +47,6 @@ import org.apache.hadoop.hdfs.protocol.C
import org.apache.hadoop.hdfs.protocol.DatanodeInfo;
import org.apache.hadoop.hdfs.protocol.LocatedBlock;
import org.apache.hadoop.hdfs.protocol.LocatedBlocks;
-import org.apache.hadoop.io.Closeable;
import org.apache.hadoop.ipc.RPC;
import org.apache.hadoop.util.Progressable;
import org.apache.hadoop.util.ReflectionUtils;
@@ -264,12 +264,9 @@ public class HFileSystem extends FilterF
public Object invoke(Object proxy, Method method,
Object[] args) throws Throwable {
try {
- if ((args == null || args.length == 0) && "close".equals(method.getName())) {
- if (cp instanceof Closeable) {
- ((Closeable)cp).close();
- } else {
- RPC.stopProxy(cp);
- }
+ if ((args == null || args.length == 0)
+ && "close".equals(method.getName())) {
+ RPC.stopProxy(cp);
return null;
} else {
Object res = method.invoke(cp, args);
@@ -380,6 +377,7 @@ public class HFileSystem extends FilterF
* createNonRecursive. This is a hadoop bug and when it is fixed in Hadoop,
* this definition will go away.
*/
+ @SuppressWarnings("deprecation")
public FSDataOutputStream createNonRecursive(Path f,
boolean overwrite,
int bufferSize, short replication, long blockSize,