当前位置: 首页>>代码示例>>Java>>正文


Java Exec.newTaskReport方法代码示例

本文整理汇总了Java中org.embulk.spi.Exec.newTaskReport方法的典型用法代码示例。如果您正苦于以下问题:Java Exec.newTaskReport方法的具体用法?Java Exec.newTaskReport怎么用?Java Exec.newTaskReport使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.embulk.spi.Exec的用法示例。


在下文中一共展示了Exec.newTaskReport方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: run

import org.embulk.spi.Exec; //导入方法依赖的package包/类
@Override
public TaskReport run(TaskSource taskSource,
        Schema schema, int taskIndex,
        PageOutput output)
{
    PluginTask task = taskSource.loadTask(PluginTask.class);
    Integer rows = task.getRows();
    final HashMap<Column, Map<String, Integer>> columnOptions = getColumnOptions(task);
    try (PageBuilder pagebuilder =
            new PageBuilder(Exec.getBufferAllocator(), schema, output)) {
        IntStream.rangeClosed(
                taskIndex * rows + 1,
                taskIndex * rows + rows
        ).boxed().forEach(rowNumber -> {
            RandomjColumnVisitor visitor = new RandomjColumnVisitor(pagebuilder, task, rowNumber, columnOptions);
            schema.visitColumns(visitor);
            pagebuilder.addRecord();
        });
        pagebuilder.finish();
    }

    TaskReport taskReport = Exec.newTaskReport();
    taskReport.set("columns", schema.size());
    taskReport.set("rows", rows);
    return taskReport;
}
 
开发者ID:yuokada,项目名称:embulk-input-randomj,代码行数:27,代码来源:RandomjInputPlugin.java

示例2: ingestServiceData

import org.embulk.spi.Exec; //导入方法依赖的package包/类
@Override
public TaskReport ingestServiceData(T task, RecordImporter recordImporter, int taskIndex, PageBuilder pageBuilder)
{
    MarketoService marketoService = new MarketoServiceImpl(createMarketoRestClient(task));
    Iterator<ServiceRecord> serviceRecords = getServiceRecords(marketoService, task);
    int imported = 0;
    while (serviceRecords.hasNext() && (imported < PREVIEW_RECORD_LIMIT || !Exec.isPreview())) {
        ServiceRecord next = serviceRecords.next();
        recordImporter.importRecord(next, pageBuilder);
        imported++;
    }
    return Exec.newTaskReport();
}
 
开发者ID:treasure-data,项目名称:embulk-input-marketo,代码行数:14,代码来源:MarketoBaseInputPluginDelegate.java

示例3: commit

import org.embulk.spi.Exec; //导入方法依赖的package包/类
@Override
public TaskReport commit()
{
    TaskReport report = Exec.newTaskReport();
    report.set("file_list", fileList);
    return report;
}
 
开发者ID:embulk,项目名称:embulk-output-sftp,代码行数:8,代码来源:SftpFileOutput.java

示例4: commit

import org.embulk.spi.Exec; //导入方法依赖的package包/类
@Override
public TaskReport commit()
{
    TaskReport report = Exec.newTaskReport();
    report.set("files", storageObjects);
    return report;
}
 
开发者ID:embulk,项目名称:embulk-output-gcs,代码行数:8,代码来源:GcsOutputPlugin.java

示例5: open

import org.embulk.spi.Exec; //导入方法依赖的package包/类
@Override
public TransactionalFileInput open(TaskSource taskSource, int taskIndex) {
	return new TransactionalFileInput() {
		private boolean eof = false;
		private int index = 0;

		@Override
		public Buffer poll() {
			if (index < list.size()) {
				String s = list.get(index++) + "\n";
				return Buffer.copyOf(s.getBytes(StandardCharsets.UTF_8));
			}

			eof = true;
			return null;
		}

		@Override
		public boolean nextFile() {
			return !eof;
		}

		@Override
		public void close() {
		}

		@Override
		public void abort() {
		}

		@Override
		public TaskReport commit() {
			return Exec.newTaskReport();
		}
	};
}
 
开发者ID:hishidama,项目名称:embulk-parser-poi_excel,代码行数:37,代码来源:EmbulkTestFileInputPlugin.java

示例6: commit

import org.embulk.spi.Exec; //导入方法依赖的package包/类
@Override
public TaskReport commit() {
    TaskReport report = Exec.newTaskReport();
    return report;
}
 
开发者ID:yahoojapan,项目名称:embulk-output-solr,代码行数:6,代码来源:SolrOutputPlugin.java

示例7: commit

import org.embulk.spi.Exec; //导入方法依赖的package包/类
@Override
public TaskReport commit()
{
    return Exec.newTaskReport();
}
 
开发者ID:tomykaira,项目名称:embulk-output-s3_per_record,代码行数:6,代码来源:S3PerRecordOutputPlugin.java

示例8: commit

import org.embulk.spi.Exec; //导入方法依赖的package包/类
public TaskReport commit()
{
    return Exec.newTaskReport();
}
 
开发者ID:takumakanari,项目名称:embulk-input-http,代码行数:5,代码来源:HttpFileInputPlugin.java

示例9: commit

import org.embulk.spi.Exec; //导入方法依赖的package包/类
@Override
public TaskReport commit()
{
    return Exec.newTaskReport();
    //TODO
}
 
开发者ID:choplin,项目名称:embulk-output-parquet,代码行数:7,代码来源:ParquetOutputPlugin.java

示例10: commit

import org.embulk.spi.Exec; //导入方法依赖的package包/类
@Override
public TaskReport commit()
{
    TaskReport report = Exec.newTaskReport();
    return report;
}
 
开发者ID:llibra,项目名称:embulk-output-s3,代码行数:7,代码来源:S3FileOutputPlugin.java


注:本文中的org.embulk.spi.Exec.newTaskReport方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。