Package org.apache.accumulo.core.security.thrift

Examples of org.apache.accumulo.core.security.thrift.AuthInfo


    MigrationCleanupThread migrationCleanupThread = new MigrationCleanupThread();
    migrationCleanupThread.start();
   
    tserverSet.startListeningForTabletServerChanges();
   
    AuthInfo systemAuths = SecurityConstants.getSystemCredentials();
    final TabletStateStore stores[] = {new ZooTabletStateStore(new ZooStore(zroot)), new RootTabletStateStore(instance, systemAuths, this),
        new MetaDataStateStore(instance, systemAuths, this)};
    for (int i = 0; i < stores.length; i++) {
      watchers.add(new TabletGroupWatcher(stores[i]));
    }
View Full Code Here


 
  private static List<KeyExtent> findTablets(boolean selectLocalTablets, String user, String pass, String table, ZooKeeperInstance zki,
      Map<KeyExtent,String> locations) throws Exception {
    SortedSet<KeyExtent> tablets = new TreeSet<KeyExtent>();
   
    MetadataTable.getEntries(zki, new AuthInfo(user, ByteBuffer.wrap(pass.getBytes()), zki.getInstanceID()), table, false, locations, tablets);
   
    InetAddress localaddress = InetAddress.getLocalHost();
   
    List<KeyExtent> candidates = new ArrayList<KeyExtent>();
   
View Full Code Here

 
  private static List<String> getTabletFiles(String user, String pass, ZooKeeperInstance zki, String tableId, KeyExtent ke) {
    List<String> files = new ArrayList<String>();
   
    SortedMap<Key,Value> tkv = new TreeMap<Key,Value>();
    MetadataTable.getTabletAndPrevTabletKeyValues(zki, tkv, ke, null, new AuthInfo(user, ByteBuffer.wrap(pass.getBytes()), zki.getInstanceID()));
   
    Set<Entry<Key,Value>> es = tkv.entrySet();
    for (Entry<Key,Value> entry : es) {
      if (entry.getKey().compareRow(ke.getMetadataEntry()) == 0) {
        if (entry.getKey().compareColumnFamily(Constants.METADATA_DATAFILE_COLUMN_FAMILY) == 0) {
View Full Code Here

      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()),
        new Text(Tables.getTableId(instance, tableName)));
  }
View Full Code Here

        log.debug("Creating connector with user: " + user);
        Connector conn = instance.getConnector(user, password);
        log.debug("Creating scanner for table: " + getTablename(attempt.getConfiguration()));
        log.debug("Authorizations are: " + authorizations);
        if (isOfflineScan(attempt.getConfiguration())) {
          scanner = new OfflineScanner(instance, new AuthInfo(user, ByteBuffer.wrap(password), instance.getInstanceID()), Tables.getTableId(instance,
              getTablename(attempt.getConfiguration())), authorizations);
        } else {
          scanner = conn.createScanner(getTablename(attempt.getConfiguration()), authorizations);
        }
        if (isIsolated(attempt.getConfiguration())) {
View Full Code Here

    if (p == null) {
      shellState.getReader().printNewline();
      return 0;
    } // user canceled
    pass = p.getBytes();
    shellState.updateUser(new AuthInfo(user, ByteBuffer.wrap(pass), shellState.getConnector().getInstance().getInstanceID()));
    return 0;
  }
View Full Code Here

          dfv.setTime(bulkTime);
        }
      }
     
      synchronized (bulkFileImportLock) {
        AuthInfo auths = SecurityConstants.getSystemCredentials();
        Connector conn;
        try {
          conn = HdfsZooInstance.getInstance().getConnector(auths.user, auths.password);
        } catch (Exception ex) {
          throw new IOException(ex);
View Full Code Here

      try {
        // the order of writing to !METADATA and walog is important in the face of machine/process failures
        // need to write to !METADATA before writing to walog, when things are done in the reverse order
        // data could be lost... the minor compaction start even should be written before the following metadata
        // write is made
        AuthInfo creds = SecurityConstants.getSystemCredentials();
       
        synchronized (timeLock) {
          if (commitSession.getMaxCommittedTime() > persistedTime)
            persistedTime = commitSession.getMaxCommittedTime();
         
View Full Code Here

        } else
          initiateMinor = true;
      }
     
      if (updateMetadata) {
        AuthInfo creds = SecurityConstants.getSystemCredentials();
        // if multiple threads were allowed to update this outside of a sync block, then it would be
        // a race condition
        MetadataTable.updateTabletFlushID(extent, tableFlushID, creds, tabletServer.getLock());
      } else if (initiateMinor)
        initiateMinorCompaction(tableFlushID);
View Full Code Here

      System.out.println("Checking table " + table + " again, failures " + check.size());
   
    Map<KeyExtent,String> locations = new TreeMap<KeyExtent,String>();
    SortedSet<KeyExtent> tablets = new TreeSet<KeyExtent>();
   
    MetadataTable.getEntries(HdfsZooInstance.getInstance(), new AuthInfo(user, pass, HdfsZooInstance.getInstance().getInstanceID()), table, false, locations,
        tablets);
   
    final HashSet<KeyExtent> failures = new HashSet<KeyExtent>();
   
    for (KeyExtent keyExtent : tablets)
View Full Code Here

TOP

Related Classes of org.apache.accumulo.core.security.thrift.AuthInfo

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.