Customer Portal

Not getting data in the out put file...

Comments 3

  • Avatar
    jurban
    0
    Comment actions Permalink
    Hi,
    how are you running the graph? Do you call TransformationGraph.free() when the graph finishes? That might flush some caches and create the output files.

    Jaro
  • Avatar
    mishra.hanu@yahoo.co.in
    0
    Comment actions Permalink
    Hi,
    My code is..

    String plugin="C:/coverETL/cloverETL.rel-2-4-6/cloverETL/plugins";
    String propertiesFile="C:/coverETL/cloverETL.rel-2-4-6/cloverETL/bin";
    EngineInitializer.initEngine(plugin, null, null);

    //System.out.println("Graph definition file: "+args[0]);
    //System.out.println("Plugins directory: "+ plugins);
    //System.out.println("Default properties file: "+ propertiesFile);

    FileInputStream in=null;
    try{
    in=new FileInputStream("C:\\FeedVaidationTool\\src\\com\\mps\\pubstats\\graph\\orphan.grf");
    }
    catch(FileNotFoundException e){
    e.printStackTrace();
    //return;
    }


    TransformationGraph graph= new TransformationGraph();
    TransformationGraphXMLReaderWriter graphReader=new TransformationGraphXMLReaderWriter(null);


    //try{
    //Iterator it =null;
    try {
    graph = graphReader.read(in);
    } catch (XMLConfigurationException e1) {
    // TODO Auto-generated catch block
    e1.printStackTrace();
    } catch (GraphConfigurationException e1) {
    // TODO Auto-generated catch block
    e1.printStackTrace();
    }

    graph.dumpGraphConfiguration();

    //prepare runtime parameters - JMX is turned off
    GraphRuntimeContext runtimeContext = new GraphRuntimeContext();
    runtimeContext.setUseJMX(false);

    GraphExecutor executor = new GraphExecutor();
    try {
    GraphExecutor.initGraph(graph);
    } catch (ComponentNotReadyException e) {
    System.out.println("Failed graph initialization!\n" + e.getMessage());
    return;
    }

    Future<Result> result;
    try{
    result = executor.runGraph(graph, runtimeContext);
    //System.out.println("Done::::"+result.isDone());
    // Result res= result.get();
    graph.free();
    //wait(10000);
    System.out.println("cancel:::::"+result.toString());
    if (result.isDone()) {
    System.out.println(":::::::::done::::::::::"+result.get().message());

    }
    if (!result.get().equals(Result.FINISHED_OK)){
    System.out.println(result.get().message());
    System.out.println("Failed graph execution!");
    return;
    }
    }catch (Exception e) {
    System.out.println("Failed graph execution!\n" + e.getMessage());
    return;
    }
  • Avatar
    mishra.hanu@yahoo.co.in
    0
    Comment actions Permalink
    Hi Jaro,


    It is working now...

    Thanks,

Please sign in to leave a comment.