Skip to content

Commit

Permalink
Fixing address parsing in Performance.java.
Browse files Browse the repository at this point in the history
  • Loading branch information
jsimsa committed Mar 29, 2016
1 parent 69bb5de commit bda4a4b
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions examples/src/main/java/alluxio/examples/Performance.java
Expand Up @@ -24,6 +24,7 @@


import com.google.common.base.Preconditions; import com.google.common.base.Preconditions;
import com.google.common.base.Throwables; import com.google.common.base.Throwables;
import com.google.common.net.HostAndPort;
import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.Path;
import org.slf4j.Logger; import org.slf4j.Logger;
import org.slf4j.LoggerFactory; import org.slf4j.LoggerFactory;
Expand All @@ -46,7 +47,7 @@ public class Performance {
private static final String FOLDER = "/mnt/ramdisk/"; private static final String FOLDER = "/mnt/ramdisk/";


private static FileSystem sFileSystem = null; private static FileSystem sFileSystem = null;
private static AlluxioURI sMasterAddress = null; private static HostAndPort sMasterAddress = null;
private static String sFileName = null; private static String sFileName = null;
private static int sBlockSizeBytes = -1; private static int sBlockSizeBytes = -1;
private static long sBlocksPerFile = -1; private static long sBlocksPerFile = -1;
Expand Down Expand Up @@ -604,7 +605,7 @@ public static void main(String[] args) throws Exception {
System.exit(-1); System.exit(-1);
} }


sMasterAddress = new AlluxioURI(args[0]); sMasterAddress = HostAndPort.fromString(args[0]);
sFileName = args[1]; sFileName = args[1];
sBlockSizeBytes = Integer.parseInt(args[2]); sBlockSizeBytes = Integer.parseInt(args[2]);
sBlocksPerFile = Long.parseLong(args[3]); sBlocksPerFile = Long.parseLong(args[3]);
Expand All @@ -629,7 +630,7 @@ public static void main(String[] args) throws Exception {


CommonUtils.warmUpLoop(); CommonUtils.warmUpLoop();


configuration.set(Constants.MASTER_HOSTNAME, sMasterAddress.getHost()); configuration.set(Constants.MASTER_HOSTNAME, sMasterAddress.getHostText());
configuration.set(Constants.MASTER_RPC_PORT, Integer.toString(sMasterAddress.getPort())); configuration.set(Constants.MASTER_RPC_PORT, Integer.toString(sMasterAddress.getPort()));


if (testCase == 1) { if (testCase == 1) {
Expand Down

0 comments on commit bda4a4b

Please sign in to comment.