Package org.apache.accumulo.core.client.mock

Examples of org.apache.accumulo.core.client.mock.MockTabletLocator


  @Override
  public List<PartitionQuery<K,T>> getPartitions(Query<K,T> query) throws IOException {
    try {
      TabletLocator tl;
      if (conn instanceof MockConnector)
        tl = new MockTabletLocator();
      else
        tl = TabletLocator.getInstance(conn.getInstance(), authInfo, new Text(Tables.getTableId(conn.getInstance(), mapping.tableName)));
     
      Map<String,Map<KeyExtent,List<Range>>> binnedRanges = new HashMap<String,Map<KeyExtent,List<Range>>>();
     
View Full Code Here


   * @since 1.5.0
   */
  public static TabletLocator getTabletLocator(Class<?> implementingClass, Configuration conf) throws TableNotFoundException {
    String instanceType = conf.get(enumToConfKey(implementingClass, InstanceOpts.TYPE));
    if ("MockInstance".equals(instanceType))
      return new MockTabletLocator();
    Instance instance = getInstance(implementingClass, conf);
    String tableName = getInputTableName(implementingClass, conf);
    return TabletLocator.getInstance(instance, new Text(Tables.getTableId(instance, tableName)));
  }
View Full Code Here

   * @throws TableNotFoundException
   *           if the table name set on the configuration doesn't exist
   */
  protected static TabletLocator getTabletLocator(Configuration conf) throws TableNotFoundException {
    if (conf.getBoolean(MOCK, false))
      return new MockTabletLocator();
    Instance instance = getInstance(conf);
    String username = getUsername(conf);
    byte[] password = getPassword(conf);
    String tableName = getTablename(conf);
    return TabletLocator.getInstance(instance, new AuthInfo(username, ByteBuffer.wrap(password), instance.getInstanceID()),
View Full Code Here

   * @since 1.5.0
   */
  public static TabletLocator getTabletLocator(Class<?> implementingClass, Configuration conf) throws TableNotFoundException {
    String instanceType = conf.get(enumToConfKey(implementingClass, InstanceOpts.TYPE));
    if ("MockInstance".equals(instanceType))
      return new MockTabletLocator();
    Instance instance = getInstance(implementingClass, conf);
    String tableName = getInputTableName(implementingClass, conf);
    return TabletLocator.getInstance(instance, new Text(Tables.getTableId(instance, tableName)));
  }
View Full Code Here

  @Override
  public List<PartitionQuery<K,T>> getPartitions(Query<K,T> query) throws IOException {
    try {
      TabletLocator tl;
      if (conn instanceof MockConnector)
        tl = new MockTabletLocator();
      else
        tl = TabletLocator.getInstance(conn.getInstance(), new Text(Tables.getTableId(conn.getInstance(), mapping.tableName)));

      Map<String,Map<KeyExtent,List<Range>>> binnedRanges = new HashMap<String,Map<KeyExtent,List<Range>>>();
View Full Code Here

   * @throws TableNotFoundException
   *           if the table name set on the configuration doesn't exist
   */
  protected static TabletLocator getTabletLocator(Configuration conf) throws TableNotFoundException {
    if (conf.getBoolean(MOCK, false))
      return new MockTabletLocator();
    Instance instance = getInstance(conf);
    String username = getUsername(conf);
    byte[] password = getPassword(conf);
    String tableName = getTablename(conf);
    return TabletLocator.getInstance(instance, new AuthInfo(username, ByteBuffer.wrap(password), instance.getInstanceID()),
View Full Code Here

    return new ZooKeeperInstance(conf.get(INSTANCE_NAME), conf.get(ZOOKEEPERS));
  }
 
  protected static TabletLocator getTabletLocator(JobContext job) throws TableNotFoundException {
    if (job.getConfiguration().getBoolean(MOCK, false))
      return new MockTabletLocator();
    Instance instance = getInstance(job);
    String username = getUsername(job);
    byte[] password = getPassword(job);
    String tableName = getTablename(job);
    return TabletLocator.getInstance(instance, new AuthInfo(username, password, instance.getInstanceID()), new Text(Tables.getTableId(instance, tableName)));
View Full Code Here

   * @throws TableNotFoundException
   *           if the table name set on the configuration doesn't exist
   */
  protected static TabletLocator getTabletLocator(Configuration conf) throws TableNotFoundException {
    if (conf.getBoolean(MOCK, false))
      return new MockTabletLocator();
    Instance instance = getInstance(conf);
    String username = getUsername(conf);
    byte[] password = getPassword(conf);
    String tableName = getTablename(conf);
    return TabletLocator.getInstance(instance, new AuthInfo(username, ByteBuffer.wrap(password), instance.getInstanceID()),
View Full Code Here

  @Override
  public List<PartitionQuery<K,T>> getPartitions(Query<K,T> query) throws IOException {
    try {
      TabletLocator tl;
      if (conn instanceof MockConnector)
        tl = new MockTabletLocator();
      else
        tl = TabletLocator.getInstance(conn.getInstance(), new Text(Tables.getTableId(conn.getInstance(), mapping.tableName)));

      Map<String,Map<KeyExtent,List<Range>>> binnedRanges = new HashMap<String,Map<KeyExtent,List<Range>>>();
View Full Code Here

  @Override
  public List<PartitionQuery<K,T>> getPartitions(Query<K,T> query) throws IOException {
    try {
      TabletLocator tl;
      if (conn instanceof MockConnector)
        tl = new MockTabletLocator();
      else
        tl = TabletLocator.getInstance(conn.getInstance(), authInfo, new Text(Tables.getTableId(conn.getInstance(), mapping.tableName)));
     
      Map<String,Map<KeyExtent,List<Range>>> binnedRanges = new HashMap<String,Map<KeyExtent,List<Range>>>();
     
View Full Code Here

TOP

Related Classes of org.apache.accumulo.core.client.mock.MockTabletLocator

Copyright © 2018 www.massapicom. 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.