Package com.alibaba.otter.shared.etl.extend.processor

Examples of com.alibaba.otter.shared.etl.extend.processor.EventProcessor


            for (DataMediaPair dataMediaPair : dataMediaPairs) {
                if (!dataMediaPair.isExistFilter()) {
                    continue;
                }

                EventProcessor eventProcessor = extensionFactory.getExtension(EventProcessor.class,
                                                                              dataMediaPair.getFilterData());
                boolean process = eventProcessor.process(eventData);
                if (!process) {
                    removeDatas.add(eventData);// 添加到删除记录中
                    break;
                }
            }
View Full Code Here


                for (DataMediaPair dataMediaPair : dataMediaPairs) {
                    if (!dataMediaPair.isExistFilter()) {
                        continue;
                    }

                    final EventProcessor eventProcessor = extensionFactory.getExtension(EventProcessor.class,
                        dataMediaPair.getFilterData());
                    if (eventProcessor instanceof DataSourceFetcherAware) {
                        ((DataSourceFetcherAware) eventProcessor).setDataSourceFetcher(new DataSourceFetcher() {

                            @Override
                            public DataSource fetch(Long tableId) {
                                DataMedia dataMedia = ConfigHelper.findDataMedia(pipeline, tableId);
                                return dataSourceService.getDataSource(pipeline.getId(), dataMedia.getSource());
                            }
                        });

                        executorTemplate.submit(new Runnable() {

                            @Override
                            public void run() {
                                MDC.put(OtterConstants.splitPipelineLogFileKey, String.valueOf(pipeline.getId()));
                                boolean process = eventProcessor.process(eventData);
                                if (!process) {
                                    removeDatas.add(eventData);// 添加到删除记录中
                                }
                            }
                        });
                    } else {
                        boolean process = eventProcessor.process(eventData);
                        if (!process) {
                            removeDatas.add(eventData);// 添加到删除记录中
                            break;
                        }
                    }
View Full Code Here

TOP

Related Classes of com.alibaba.otter.shared.etl.extend.processor.EventProcessor

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.