Skip to content

Commit 039cdbb

Browse files
author
Matthew Farrellee
committed
Turn class methods into instance methods on GlusterFSXattr
Signed-off-by: Matthew Farrellee <[email protected]>
1 parent 6d4b387 commit 039cdbb

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

src/main/java/org/apache/hadoop/fs/glusterfs/GlusterFSXattr.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public enum CMD {
4545
public GlusterFSXattr(){
4646
}
4747

48-
public static String brick2host(String brick) throws IOException{
48+
public String brick2host(String brick) throws IOException{
4949
String[] hf=null;
5050

5151
hf=brick.split(":");
@@ -57,7 +57,7 @@ public static String brick2host(String brick) throws IOException{
5757
return hf[0];
5858
}
5959

60-
public static String brick2file(String brick) throws IOException{
60+
public String brick2file(String brick) throws IOException{
6161
String[] hf=null;
6262

6363
hf=brick.split(":");
@@ -69,7 +69,7 @@ public static String brick2file(String brick) throws IOException{
6969
return hf[1];
7070
}
7171

72-
public static BlockLocation[] getPathInfo(String filename,long start,long len) throws IOException{
72+
public BlockLocation[] getPathInfo(String filename,long start,long len) throws IOException{
7373
HashMap<String, ArrayList<String>> vol=null;
7474
HashMap<String, Integer> meta=new HashMap<String, Integer>();
7575

@@ -78,7 +78,7 @@ public static BlockLocation[] getPathInfo(String filename,long start,long len) t
7878
return getHints(vol, meta, start, len, null);
7979
}
8080

81-
public static long getBlockSize(String filename) throws IOException{
81+
public long getBlockSize(String filename) throws IOException{
8282
HashMap<String, ArrayList<String>> vol=null;
8383
HashMap<String, Integer> meta=new HashMap<String, Integer>();
8484

@@ -91,7 +91,7 @@ public static long getBlockSize(String filename) throws IOException{
9191

9292
}
9393

94-
public static short getReplication(String filename) throws IOException{
94+
public short getReplication(String filename) throws IOException{
9595
HashMap<String, ArrayList<String>> vol=null;
9696
HashMap<String, Integer> meta=new HashMap<String, Integer>();
9797

@@ -101,7 +101,7 @@ public static short getReplication(String filename) throws IOException{
101101

102102
}
103103

104-
public static TreeMap<Integer, GlusterFSBrickClass> quickIOPossible(String filename,long start,long len) throws IOException{
104+
public TreeMap<Integer, GlusterFSBrickClass> quickIOPossible(String filename,long start,long len) throws IOException{
105105
String realpath=null;
106106
HashMap<String, ArrayList<String>> vol=null;
107107
HashMap<String, Integer> meta=new HashMap<String, Integer>();
@@ -117,7 +117,7 @@ public static TreeMap<Integer, GlusterFSBrickClass> quickIOPossible(String filen
117117
return hnts;
118118
}
119119

120-
public static HashMap<String, ArrayList<String>> execGetFattr(String filename,HashMap<String, Integer> meta,CMD cmd) throws IOException{
120+
public HashMap<String, ArrayList<String>> execGetFattr(String filename,HashMap<String, Integer> meta,CMD cmd) throws IOException{
121121
Process p=null;
122122
BufferedReader brInput=null;
123123
String s=null;
@@ -228,7 +228,7 @@ else if(enclosingXl.equalsIgnoreCase("distribute"))
228228
return vol;
229229
}
230230

231-
static BlockLocation[] getHints(HashMap<String, ArrayList<String>> vol,HashMap<String, Integer> meta,long start,long len,TreeMap<Integer, GlusterFSBrickClass> hnts) throws IOException{
231+
BlockLocation[] getHints(HashMap<String, ArrayList<String>> vol,HashMap<String, Integer> meta,long start,long len,TreeMap<Integer, GlusterFSBrickClass> hnts) throws IOException{
232232
String brick=null;
233233
String key=null;
234234
boolean done=false;
@@ -430,7 +430,7 @@ else if(allocCtr<=stripedBricks.size()){
430430
}
431431

432432
/* TODO: use meta{dcount,scount,rcount} for checking */
433-
public static int getReplicationFromLayout(HashMap<String, ArrayList<String>> vol,HashMap<String, Integer> meta) throws IOException{
433+
public int getReplicationFromLayout(HashMap<String, ArrayList<String>> vol,HashMap<String, Integer> meta) throws IOException{
434434
int replication=0;
435435
LAYOUT l=LAYOUT.valueOf(vol.get("layout").get(0));
436436

0 commit comments

Comments
 (0)