Package org.kiji.schema.avro

Examples of org.kiji.schema.avro.TableLayoutsBackup


    Preconditions.checkState(state == State.OPEN,
        "Cannot backup MetaTable instance in state %s.", state);
    Map<String, TableBackup> backupEntries = new HashMap<String, TableBackup>();
    List<String> tables = listTables();
    for (String table : tables) {
      TableLayoutsBackup layouts = mTableLayoutDatabase.layoutsToBackup(table);
      KeyValueBackup keyValues = mTableKeyValueDatabase.keyValuesToBackup(table);
      final TableBackup tableBackup = TableBackup.newBuilder()
          .setName(table)
          .setTableLayoutsBackup(layouts)
          .setKeyValueBackup(keyValues)
View Full Code Here


  /** {@inheritDoc} */
  @Override
  public TableLayoutsBackup layoutsToBackup(String table) throws IOException {
    final List<TableLayoutBackupEntry> history = Lists.newArrayList();
    final TableLayoutsBackup backup = TableLayoutsBackup.newBuilder().setLayouts(history).build();

    final List<Row> rows = getRows(table, Integer.MAX_VALUE);
    if (rows.isEmpty()) {
      LOG.info(String.format(
          "There is no row in the MetaTable named '%s' or the row is empty.", table));
View Full Code Here

    Preconditions.checkState(state == State.OPEN,
        "Cannot backup MetaTable instance in state %s.", state);
    Map<String, TableBackup> backupEntries = new HashMap<String, TableBackup>();
    List<String> tables = listTables();
    for (String table : tables) {
      TableLayoutsBackup layouts = mTableLayoutDatabase.layoutsToBackup(table);
      KeyValueBackup keyValues = mTableKeyValueDatabase.keyValuesToBackup(table);
      final TableBackup tableBackup = TableBackup.newBuilder()
          .setName(table)
          .setTableLayoutsBackup(layouts)
          .setKeyValueBackup(keyValues)
View Full Code Here

               .setUpdate(update)
               .setTimestamp(timestamp)
               .build());
         }
       }
       TableLayoutsBackup backup = TableLayoutsBackup.newBuilder().setLayouts(history).build();
       return backup;
  }
View Full Code Here

TOP

Related Classes of org.kiji.schema.avro.TableLayoutsBackup

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.