1
votes

I have marklogic 9 on a cluster . I am trying to perform mlcp from one collection to another on the server .

Please find the attached code below

            MlcpBean mlcpBean =  new MlcpBean(); 
            mlcpBean.setCommand("COPY");
            mlcpBean.setInput_database("somehost");

            mlcpBean.setCollection_filter("somecollection");
            mlcpBean.setInput_host("somehost"); 
            mlcpBean.setInput_port(some port);


            mlcpBean.setInput_username("some user id");


            mlcpBean.setInput_password("some password");

           String[] args1 = mlcpBean.buildArgs(); 

      String[] expandedArgs =
      OptionsFileUtil.expandArguments(args1); 
      // Invoke mlcp
      ContentPump.runCommand(expandedArgs); }



    When I run the above  class it gives me the following error


    01:01:00.104 [scheduling-1] WARN  c.m.mapreduce.MarkLogicInputFormat - Unable to connect to "********.com" to query source information

    01:01:00.104 [scheduling-1] ERROR c.m.contentpump.LocalJobRunner - Error getting input splits: 






    01:01:00.104 [scheduling-1] ERROR c.m.contentpump.LocalJobRunner - Unable to query source information, no usable hostname found.

It does not even connect to the host .

I have verified from another program which is not runnning mlcp but using databaseclientfactory that connection could be established

I am also unable to verify if -ssl_protocol is TLSv1.2

Can some one kindly help me with this issue.

2

2 Answers

1
votes

It looks like you're using the classes found in the MLCP JAR to build a new Java program. That approach is actually not supported and puts you at risk of things changing, unannounced, in a future release. If this is a one-off copy, you could use MLCP as a command-line tool; if this is for something you intend to use over time, you should use MarkLogic's Data Movement SDK, intended for tasks like this.

I encourage you to give that a try and then post a new question if you have trouble with DMSDK.

0
votes

I think by setting the setInput_ssl (boolean) and setOutput_ssl(boolean) the problem can be solved on mlcp .