Examples of ImportTable


Examples of com.asakusafw.compiler.bulkloader.BulkLoaderScript.ImportTable

        BulkLoaderScript script = loadScript(info);
        assertThat(script.getImportTargetTables().size(), is(1));
        assertThat(script.getExportTargetTables().size(), is(1));

        ImportTable itable = script.getImportTargetTables().get(0);
        ExportTable etable = script.getExportTargetTables().get(0);
        assertThat(etable.getSources().size(), is(1));

        ModelOutput<Ex1> source = tester.openOutput(Ex1.class, itable.getDestination());
        Ex1 ex1 = new Ex1();
        ex1.setSid(200);
        ex1.setValue(1);
        source.write(ex1);
        ex1.setSid(300);
View Full Code Here

Examples of com.asakusafw.compiler.bulkloader.BulkLoaderScript.ImportTable

        BulkLoaderScript script = loadScript(info);
        assertThat(script.getImportTargetTables().size(), is(1));
        assertThat(script.getExportTargetTables().size(), is(1));

        ImportTable itable = script.getImportTargetTables().get(0);
        ExportTable etable = script.getExportTargetTables().get(0);
        assertThat(etable.getSources().size(), is(1));

        ModelOutput<Ex1> source = tester.openOutput(Ex1.class, itable.getDestination());
        Ex1 ex1 = new Ex1();
        ex1.setSid(200);
        ex1.setValue(1);
        source.write(ex1);
        ex1.setSid(300);
View Full Code Here

Examples of com.asakusafw.compiler.bulkloader.BulkLoaderScript.ImportTable

     */
    @Test
    public void importers() {
        List<ImportTable> importers = Lists.create();
        List<ExportTable> exporters = Lists.create();
        importers.add(new ImportTable(
                Ex1.class,
                "EX1",
                Arrays.asList("SID", "VALUE", "STRING", "LAST_UPDATE_TIME", "JOBFLOW_SID", "CACHE_FILE_SID"),
                "VALUE > 0",
                "cache-id",
                LockType.ROW,
                LockedOperation.ERROR,
                Location.fromPath("ex1", '/')));
        importers.add(new ImportTable(
                Ex2.class,
                "EX2",
                Arrays.asList("SID", "VALUE", "STRING", "LAST_UPDATE_TIME", "JOBFLOW_SID", "CACHE_FILE_SID"),
                "VALUE < 0",
                null,
View Full Code Here

Examples of com.asakusafw.compiler.bulkloader.BulkLoaderScript.ImportTable

            lockedOperation = LockedOperation.FORCE;
            break;
        default:
            throw new AssertionError(desc.getLockType());
        }
        return new ImportTable(
                desc.getModelType(),
                desc.getTableName(),
                desc.getColumnNames(),
                desc.getWhere(),
                desc.isCacheEnabled() ? desc.calculateCacheId() : null,
View Full Code Here

Examples of org.apache.accumulo.master.tableOps.ImportTable

        }

        if (!master.security.canImport(c, tableName, exportDir, namespaceId))
          throw new ThriftSecurityException(c.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);

        master.fate.seedTransaction(opid, new TraceRepo<Master>(new ImportTable(c.getPrincipal(), tableName, exportDir, namespaceId)), autoCleanup);
        break;
      }
      case TABLE_EXPORT: {
        TableOperation tableOp = TableOperation.EXPORT;
        String tableName = validateTableNameArgument(arguments.get(0), tableOp, Tables.NOT_SYSTEM);
View Full Code Here

Examples of org.apache.accumulo.server.master.tableOps.ImportTable

            throw new ThriftSecurityException(c.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
         
          checkNotMetadataTable(tableName, TableOperation.CREATE);
          checkTableName(tableName, TableOperation.CREATE);
         
          fate.seedTransaction(opid, new TraceRepo<Master>(new ImportTable(c.getPrincipal(), tableName, exportDir)), autoCleanup);
          break;
        }
        case EXPORT: {
          String tableName = ByteBufferUtil.toString(arguments.get(0));
          String exportDir = ByteBufferUtil.toString(arguments.get(1));
View Full Code Here

Examples of org.apache.accumulo.server.master.tableOps.ImportTable

            throw new ThriftSecurityException(c.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
         
          checkNotMetadataTable(tableName, TableOperation.CREATE);
          checkTableName(tableName, TableOperation.CREATE);
         
          fate.seedTransaction(opid, new TraceRepo<Master>(new ImportTable(c.getPrincipal(), tableName, exportDir)), autoCleanup);
          break;
        }
        case EXPORT: {
          String tableName = ByteBufferUtil.toString(arguments.get(0));
          String exportDir = ByteBufferUtil.toString(arguments.get(1));
View Full Code Here

Examples of org.apache.accumulo.server.master.tableOps.ImportTable

            throw new ThriftSecurityException(c.getPrincipal(), SecurityErrorCode.PERMISSION_DENIED);
         
          checkNotMetadataTable(tableName, TableOperation.CREATE);
          checkTableName(tableName, TableOperation.CREATE);
         
          fate.seedTransaction(opid, new TraceRepo<Master>(new ImportTable(c.getPrincipal(), tableName, exportDir)), autoCleanup);
          break;
        }
        case EXPORT: {
          String tableName = ByteBufferUtil.toString(arguments.get(0));
          String exportDir = ByteBufferUtil.toString(arguments.get(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.