Package com.alibaba.otter.node.etl.common.pipe.impl.http.archive

Examples of com.alibaba.otter.node.etl.common.pipe.impl.http.archive.ArchiveBean.pack()


        File archiveFile = new File("/tmp/otter/test.gzip");
        if (archiveFile.exists()) {
            archiveFile.delete();
        }

        boolean result = archiveBean.pack(archiveFile, fileDatas, new ArchiveRetriverCallback<FileData>() {

            public InputStream retrive(FileData source) {
                return new LazyFileInputStream(new File("/tmp/otter/test", source.getPath()));
            }
        });
View Full Code Here


            // FileData filedata = new FileData();
            // filedata.setPath(files[i].getPath());
            // fileDatas.add(filedata);
            // }

            archiveBean.pack(archiveFile, fileDatas, new ArchiveRetriverCallback<FileData>() {

                public InputStream retrive(FileData source) {
                    try {
                        return new FileInputStream(new File(source.getPath()));
                    } catch (FileNotFoundException e) {
View Full Code Here

        int poolSize = pipeline.getParameters().getFileLoadPoolSize();
        boolean useLocalFileMutliThread = pipeline.getParameters().getUseLocalFileMutliThread();
        ArchiveBean archiveBean = getArchiveBean();
        archiveBean.adjustPoolSize(poolSize);// 调整线程池大小
        archiveBean.setUseLocalFileMutliThread(useLocalFileMutliThread);// 设置是否启用local多线程同步
        boolean done = archiveBean.pack(file, fileDatas, new ArchiveRetriverCallback<FileData>() {

            public InputStream retrive(FileData fileData) {
                boolean miss = false;
                try {
                    if (StringUtils.isNotEmpty(fileData.getNameSpace())) {
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.