Skip to content

Commit

Permalink
add ctors
Browse files Browse the repository at this point in the history
  • Loading branch information
peisun1115 committed May 16, 2016
1 parent 4d20daa commit db6712e
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 3 deletions.
Expand Up @@ -38,6 +38,17 @@ public BlockMasterClientPool(InetSocketAddress masterAddress) {
mMasterAddress = masterAddress;
}

/**
* Creates a new block master client pool.
*
* @param masterAddress the master address
* @param clientThreads the number of client threads to use
*/
public BlockMasterClientPool(InetSocketAddress masterAddress, int clientThreads) {
super(clientThreads);
mMasterAddress = masterAddress;
}

@Override
public void close() {
// TODO(calvin): Consider collecting all the clients and shutting them down.
Expand Down
Expand Up @@ -19,12 +19,15 @@

import javax.annotation.concurrent.ThreadSafe;

/**
* A fixed pool of FileSystemMasterClient instances.
*/
@ThreadSafe
final class FileSystemMasterClientPool extends ResourcePool<FileSystemMasterClient> {
public final class FileSystemMasterClientPool extends ResourcePool<FileSystemMasterClient> {
private final InetSocketAddress mMasterAddress;

/**
* Creates a new file stream master client pool.
* Creates a new file system master client pool.
*
* @param masterAddress the master address
*/
Expand All @@ -33,6 +36,17 @@ public FileSystemMasterClientPool(InetSocketAddress masterAddress) {
mMasterAddress = masterAddress;
}

/**
* Creates a new file system master client pool.
*
* @param masterAddress the master address
* @param clientThreads the number of client threads to use
*/
public FileSystemMasterClientPool(InetSocketAddress masterAddress, int clientThreads) {
super(clientThreads);
mMasterAddress = masterAddress;
}

@Override
public void close() {
// TODO(calvin): Consider collecting all the clients and shutting them down
Expand Down
2 changes: 1 addition & 1 deletion core/common/src/main/java/alluxio/Constants.java
Expand Up @@ -52,7 +52,7 @@ public final class Constants {
public static final String MESOS_RESOURCE_DISK = "disk";
public static final String MESOS_RESOURCE_PORTS = "ports";

public static final int SECOND_NANO = 1000000000;
public static final long SECOND_NANO = 1000000000;
public static final int SECOND_MS = 1000;
public static final int MINUTE_MS = SECOND_MS * 60;
public static final int HOUR_MS = MINUTE_MS * 60;
Expand Down

0 comments on commit db6712e

Please sign in to comment.