Package org.apache.hadoop.hive.metastore.api

Examples of org.apache.hadoop.hive.metastore.api.ShowCompactResponse$ShowCompactResponseStandardSchemeFactory


    return 0;
  }

  private int showCompactions(ShowCompactionsDesc desc) throws HiveException {
    // Call the metastore to get the currently queued and running compactions.
    ShowCompactResponse rsp = db.showCompactions();

    // Write the results into the file
    DataOutputStream os = null;
    try {
      Path resFile = new Path(desc.getResFile());
      FileSystem fs = resFile.getFileSystem(conf);
      os = fs.create(resFile);

      // Write a header
      os.writeBytes("Database");
      os.write(separator);
      os.writeBytes("Table");
      os.write(separator);
      os.writeBytes("Partition");
      os.write(separator);
      os.writeBytes("Type");
      os.write(separator);
      os.writeBytes("State");
      os.write(separator);
      os.writeBytes("Worker");
      os.write(separator);
      os.writeBytes("Start Time");
      os.write(terminator);

      if (rsp.getCompacts() != null) {
        for (ShowCompactResponseElement e : rsp.getCompacts()) {
          os.writeBytes(e.getDbname());
          os.write(separator);
          os.writeBytes(e.getTablename());
          os.write(separator);
          String part = e.getPartitionname();
View Full Code Here


    return 0;
  }

  private int showCompactions(ShowCompactionsDesc desc) throws HiveException {
    // Call the metastore to get the currently queued and running compactions.
    ShowCompactResponse rsp = db.showCompactions();

    // Write the results into the file
    DataOutputStream os = null;
    try {
      Path resFile = new Path(desc.getResFile());
      FileSystem fs = resFile.getFileSystem(conf);
      os = fs.create(resFile);

      // Write a header
      os.writeBytes("Database");
      os.write(separator);
      os.writeBytes("Table");
      os.write(separator);
      os.writeBytes("Partition");
      os.write(separator);
      os.writeBytes("Type");
      os.write(separator);
      os.writeBytes("State");
      os.write(separator);
      os.writeBytes("Worker");
      os.write(separator);
      os.writeBytes("Start Time");
      os.write(terminator);

      if (rsp.getCompacts() != null) {
        for (ShowCompactResponseElement e : rsp.getCompacts()) {
          os.writeBytes(e.getDbname());
          os.write(separator);
          os.writeBytes(e.getTablename());
          os.write(separator);
          String part = e.getPartitionname();
View Full Code Here

        long startedAt = System.currentTimeMillis();

        // Wrap the inner parts of the loop in a catch throwable so that any errors in the loop
        // don't doom the entire thread.
        try {
          ShowCompactResponse currentCompactions = txnHandler.showCompact(new ShowCompactRequest());
          ValidTxnList txns = TxnHandler.createValidTxnList(txnHandler.getOpenTxns());
          Set<CompactionInfo> potentials = txnHandler.findPotentialCompactions(abortedThreashold);
          LOG.debug("Found " + potentials.size() + " potential compactions, " +
              "checking to see if we should compact any of them");
          for (CompactionInfo ci : potentials) {
View Full Code Here

        long startedAt = System.currentTimeMillis();

        // Wrap the inner parts of the loop in a catch throwable so that any errors in the loop
        // don't doom the entire thread.
        try {
          ShowCompactResponse currentCompactions = txnHandler.showCompact(new ShowCompactRequest());
          ValidTxnList txns = TxnHandler.createValidTxnList(txnHandler.getOpenTxns(), 0);
          Set<CompactionInfo> potentials = txnHandler.findPotentialCompactions(abortedThreshold);
          LOG.debug("Found " + potentials.size() + " potential compactions, " +
              "checking to see if we should compact any of them");
          for (CompactionInfo ci : potentials) {
View Full Code Here

    AtomicBoolean stop = new AtomicBoolean();
    AtomicBoolean looped = new AtomicBoolean();
    stop.set(true);
    t.init(stop, looped);
    t.run();
    ShowCompactResponse rsp = txnHandler.showCompact(new ShowCompactRequest());
    List<ShowCompactResponseElement> compacts = rsp.getCompacts();
    Assert.assertEquals(1, compacts.size());
    Assert.assertEquals("ready for cleaning", compacts.get(0).getState());

    stats = msClient.getPartitionColumnStatistics(ci.dbname, ci.tableName,
      Arrays.asList(ci.partName), colNames);
View Full Code Here

    return 0;
  }

  private int showCompactions(ShowCompactionsDesc desc) throws HiveException {
    // Call the metastore to get the currently queued and running compactions.
    ShowCompactResponse rsp = db.showCompactions();

    // Write the results into the file
    DataOutputStream os = null;
    try {
      Path resFile = new Path(desc.getResFile());
      FileSystem fs = resFile.getFileSystem(conf);
      os = fs.create(resFile);

      // Write a header
      os.writeBytes("Database");
      os.write(separator);
      os.writeBytes("Table");
      os.write(separator);
      os.writeBytes("Partition");
      os.write(separator);
      os.writeBytes("Type");
      os.write(separator);
      os.writeBytes("State");
      os.write(separator);
      os.writeBytes("Worker");
      os.write(separator);
      os.writeBytes("Start Time");
      os.write(terminator);

      if (rsp.getCompacts() != null) {
        for (ShowCompactResponseElement e : rsp.getCompacts()) {
          os.writeBytes(e.getDbname());
          os.write(separator);
          os.writeBytes(e.getTablename());
          os.write(separator);
          String part = e.getPartitionname();
View Full Code Here

        long startedAt = System.currentTimeMillis();

        // Wrap the inner parts of the loop in a catch throwable so that any errors in the loop
        // don't doom the entire thread.
        try {
          ShowCompactResponse currentCompactions = txnHandler.showCompact(new ShowCompactRequest());
          ValidTxnList txns = TxnHandler.createValidTxnList(txnHandler.getOpenTxns());
          Set<CompactionInfo> potentials = txnHandler.findPotentialCompactions(abortedThreashold);
          LOG.debug("Found " + potentials.size() + " potential compactions, " +
              "checking to see if we should compact any of them");
          for (CompactionInfo ci : potentials) {
View Full Code Here

    return 0;
  }

  private int showCompactions(ShowCompactionsDesc desc) throws HiveException {
    // Call the metastore to get the currently queued and running compactions.
    ShowCompactResponse rsp = db.showCompactions();

    // Write the results into the file
    DataOutputStream os = null;
    try {
      Path resFile = new Path(desc.getResFile());
      FileSystem fs = resFile.getFileSystem(conf);
      os = fs.create(resFile);

      // Write a header
      os.writeBytes("Database");
      os.write(separator);
      os.writeBytes("Table");
      os.write(separator);
      os.writeBytes("Partition");
      os.write(separator);
      os.writeBytes("Type");
      os.write(separator);
      os.writeBytes("State");
      os.write(separator);
      os.writeBytes("Worker");
      os.write(separator);
      os.writeBytes("Start Time");
      os.write(terminator);

      if (rsp.getCompacts() != null) {
        for (ShowCompactResponseElement e : rsp.getCompacts()) {
          os.writeBytes(e.getDbname());
          os.write(separator);
          os.writeBytes(e.getTablename());
          os.write(separator);
          String part = e.getPartitionname();
View Full Code Here

    return 0;
  }

  private int showCompactions(ShowCompactionsDesc desc) throws HiveException {
    // Call the metastore to get the currently queued and running compactions.
    ShowCompactResponse rsp = db.showCompactions();

    // Write the results into the file
    DataOutputStream os = null;
    try {
      Path resFile = new Path(desc.getResFile());
      FileSystem fs = resFile.getFileSystem(conf);
      os = fs.create(resFile);

      // Write a header
      os.writeBytes("Database");
      os.write(separator);
      os.writeBytes("Table");
      os.write(separator);
      os.writeBytes("Partition");
      os.write(separator);
      os.writeBytes("Type");
      os.write(separator);
      os.writeBytes("State");
      os.write(separator);
      os.writeBytes("Worker");
      os.write(separator);
      os.writeBytes("Start Time");
      os.write(terminator);

      if (rsp.getCompacts() != null) {
        for (ShowCompactResponseElement e : rsp.getCompacts()) {
          os.writeBytes(e.getDbname());
          os.write(separator);
          os.writeBytes(e.getTablename());
          os.write(separator);
          String part = e.getPartitionname();
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hive.metastore.api.ShowCompactResponse$ShowCompactResponseStandardSchemeFactory

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.