Search in sources :

Example 6 with IHadoopClusterService

use of org.talend.core.hadoop.IHadoopClusterService in project tdi-studio-se by Talend.

the class DatabaseTypeFilter method getHadoopSubMultiRepTypeProcessor.

private IRepositoryTypeProcessor getHadoopSubMultiRepTypeProcessor(String[] repTypes) {
    IHadoopClusterService hadoopClusterService = HadoopRepositoryUtil.getHadoopClusterService();
    if (hadoopClusterService != null) {
        List<String> repTypeList = new ArrayList<String>();
        Map<String, Object> attributes = new HashMap<String, Object>();
        for (String repType : repTypes) {
            Map<String, Object> attr = parseAttributes(repType);
            if (attr == null) {
                repTypeList.add(repType);
            } else {
                attributes.putAll(attr);
            }
        }
        IRepositoryTypeProcessor processor = hadoopClusterService.getHadoopSubMultiRepTypeProcessor(repTypeList.toArray(new String[0]));
        processor.setAttributes(attributes);
        return processor;
    }
    return null;
}
Also used : IHadoopClusterService(org.talend.core.hadoop.IHadoopClusterService) HashMap(java.util.HashMap) ArrayList(java.util.ArrayList) IRepositoryViewObject(org.talend.core.model.repository.IRepositoryViewObject) IRepositoryTypeProcessor(org.talend.core.model.repository.IRepositoryTypeProcessor)

Aggregations

IHadoopClusterService (org.talend.core.hadoop.IHadoopClusterService)6 Item (org.talend.core.model.properties.Item)4 ProcessItem (org.talend.core.model.properties.ProcessItem)4 ConnectionItem (org.talend.core.model.properties.ConnectionItem)3 ContextItem (org.talend.core.model.properties.ContextItem)3 FileItem (org.talend.core.model.properties.FileItem)3 JobletProcessItem (org.talend.core.model.properties.JobletProcessItem)3 SQLPatternItem (org.talend.core.model.properties.SQLPatternItem)3 IElementParameter (org.talend.core.model.process.IElementParameter)2 BusinessProcessItem (org.talend.core.model.properties.BusinessProcessItem)2 FolderItem (org.talend.core.model.properties.FolderItem)2 LinkDocumentationItem (org.talend.core.model.properties.LinkDocumentationItem)2 ReferenceFileItem (org.talend.core.model.properties.ReferenceFileItem)2 RoutineItem (org.talend.core.model.properties.RoutineItem)2 SnippetItem (org.talend.core.model.properties.SnippetItem)2 TDQItem (org.talend.core.model.properties.TDQItem)2 IRepositoryViewObject (org.talend.core.model.repository.IRepositoryViewObject)2 ArrayList (java.util.ArrayList)1 HashMap (java.util.HashMap)1 HashSet (java.util.HashSet)1