Skip to content

Commit

Permalink
Merge pull request #2197 from aaudiber/precondition-typo
Browse files Browse the repository at this point in the history
[SMALLFIX] Fix typo in error message
  • Loading branch information
yupeng9 committed Dec 2, 2015
2 parents 1b8883c + 823936e commit 8c6c9f6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
Expand Up @@ -49,11 +49,12 @@
import tachyon.client.file.options.MkdirOptions;
import tachyon.client.file.options.OutStreamOptions;
import tachyon.conf.TachyonConf;
import tachyon.exception.ConnectionFailedException;
import tachyon.exception.ExceptionMessage;
import tachyon.exception.FileDoesNotExistException;
import tachyon.exception.InvalidPathException;
import tachyon.exception.PreconditionMessage;
import tachyon.exception.TachyonException;
import tachyon.exception.ConnectionFailedException;
import tachyon.thrift.FileBlockInfo;
import tachyon.thrift.FileInfo;
import tachyon.thrift.NetAddress;
Expand Down Expand Up @@ -350,8 +351,8 @@ public Path getWorkingDirectory() {
*/
@Override
public void initialize(URI uri, Configuration conf) throws IOException {
Preconditions.checkNotNull(uri.getHost(), "URI hostname must not be null");
Preconditions.checkNotNull(uri.getPort(), "URI post must not be null");
Preconditions.checkNotNull(uri.getHost(), PreconditionMessage.URI_HOST_NULL);
Preconditions.checkNotNull(uri.getPort(), PreconditionMessage.URI_PORT_NULL);
super.initialize(uri, conf);
LOG.info("initialize({}, {}). Connecting to Tachyon: {}", uri, conf, uri.toString());
Utils.addS3Credentials(conf);
Expand Down
Expand Up @@ -57,6 +57,8 @@ public class PreconditionMessage {
"File being persisted must be complete";
public static final String ERR_SET_STATE_UNPERSIST =
"Cannot set the state of a file to not-persisted";
public static final String URI_HOST_NULL = "URI hostname must not be null";
public static final String URI_PORT_NULL = "URI port must not be null";

private PreconditionMessage() {} // to prevent initialization
}

0 comments on commit 8c6c9f6

Please sign in to comment.