Examples of KijiURIException


Examples of org.kiji.schema.KijiURIException

      }
      // Should have no more than a single @ appear!
      final List<String> userInfoAndHostPortInfo =
          ImmutableList.copyOf(Splitter.on('@').split(authority));
      if (2 != userInfoAndHostPortInfo.size()) {
        throw new KijiURIException(
            uri.toString(), "Cannot have more than one '@' in URI authority");
      }
      Preconditions.checkArgument(2 == userInfoAndHostPortInfo.size());
      return userInfoAndHostPortInfo.get(1);
    }
View Full Code Here

Examples of org.kiji.schema.KijiURIException

          KijiURI.ENV_URI_STRING, DEFAULT_CONTACT_POINT, DEFAULT_CONTACT_PORT, uri);
    }
    try {
      return new CassandraKijiURIParser().parse(new URI(uri));
    } catch (URISyntaxException exn) {
      throw new KijiURIException(uri, exn.getMessage());
    }
  }
View Full Code Here

Examples of org.kiji.schema.KijiURIException

      return newBuilder(uri.toString()).build();
    } catch (URISyntaxException e) {
      // This should never happen
      throw new InternalKijiError(String.format("KijiURI was incorrectly constructed: %s.", this));
    } catch (IllegalArgumentException e) {
      throw new KijiURIException(this.toString(),
          String.format("Path can not be resolved: %s", path));
    }
  }
View Full Code Here

Examples of org.kiji.schema.KijiURIException

      // Cassandra Kiji URIs aren't strictly legal - the Cassandra "authority" is really the first
      // part of the path.
      final List<String> segments = Splitter.on('/').omitEmptyStrings().splitToList(uri.getPath());
      if (segments.size() < 1) {
        throw new KijiURIException(uri.toString(), "Cassandra contact points must be specified.");
      }
      final String cassandraAuthority = segments.get(0);
      final AuthorityParser cassandraAuthorityParser = AuthorityParser.getAuthorityParser(
          cassandraAuthority,
          uri);

      // We currently support either neither a username nor a password, OR a username and a
      // password, but not a username without a password.
      if (null != cassandraAuthorityParser.getUsername()
          && null == cassandraAuthorityParser.getPassword()) {
        throw new KijiURIException(uri.toString(),
            "Cassandra Kiji URIs do not support a username without a password.");

      }

      final PathParser segmentParser = new PathParser(uri, 1);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.