0

Following this ML documentation I am running sample marklogic-hello-world.xml by using the configuration that was present in the documentation. My localhost name is ubuntu.localdomain . When i am giving the same in my configuration file it is throwing error like this

    18/01/04 22:39:54 INFO mapred.MapTask: (EQUATOR) 0 kvi 26214396(104857584)
18/01/04 22:39:54 INFO mapred.MapTask: mapreduce.task.io.sort.mb: 100
18/01/04 22:39:54 INFO mapred.MapTask: soft limit at 83886080
18/01/04 22:39:54 INFO mapred.MapTask: bufstart = 0; bufvoid = 104857600
18/01/04 22:39:54 INFO mapred.MapTask: kvstart = 26214396; length = 6553600
18/01/04 22:39:54 INFO mapred.MapTask: Map output collector class = org.apache.hadoop.mapred.MapTask$MapOutputBuffer
18/01/04 22:40:05 INFO mapred.MapTask: Starting flush of map output
18/01/04 22:40:05 INFO mapred.LocalJobRunner: map task executor complete.
18/01/04 22:40:05 WARN mapred.LocalJobRunner: job_local196795803_0001
java.lang.Exception: java.lang.IllegalArgumentException: Default provider - Not a usable net address: ubuntu.localdomain:8000
    at org.apache.hadoop.mapred.LocalJobRunner$Job.runTasks(LocalJobRunner.java:462)
    at org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:522)
Caused by: java.lang.IllegalArgumentException: Default provider - Not a usable net address: ubuntu.localdomain:8000
    at com.marklogic.xcc.ContentSourceFactory.defaultConnectionProvider(ContentSourceFactory.java:453)
    at com.marklogic.xcc.ContentSourceFactory.newContentSource(ContentSourceFactory.java:264)
    at com.marklogic.xcc.ContentSourceFactory.newContentSource(ContentSourceFactory.java:321)
    at com.marklogic.mapreduce.utilities.InternalUtilities.getInputContentSource(InternalUtilities.java:127)
    at com.marklogic.mapreduce.MarkLogicRecordReader.init(MarkLogicRecordReader.java:348)
    at com.marklogic.mapreduce.MarkLogicRecordReader.initialize(MarkLogicRecordReader.java:247)
    at org.apache.hadoop.mapred.MapTask$NewTrackingRecordReader.initialize(MapTask.java:548)
    at org.apache.hadoop.mapred.MapTask.runNewMapper(MapTask.java:786)
    at org.apache.hadoop.mapred.MapTask.run(MapTask.java:341)
    at org.apache.hadoop.mapred.LocalJobRunner$Job$MapTaskRunnable.run(LocalJobRunner.java:243)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:514)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
    at java.base/java.lang.Thread.run(Thread.java:844)
18/01/04 22:40:05 INFO mapreduce.Job: Job job_local196795803_0001 failed with state FAILED due to: NA
18/01/04 22:40:05 INFO mapreduce.Job: Counters: 0

My configuration file is like this

<configuration>
    <property>
        <name>mapreduce.marklogic.input.username</name>
        <value>admin</value>
    </property>
    <property>
        <name>mapreduce.marklogic.input.password</name>
        <value>admin</value>
    </property>
    <property>
        <name>mapreduce.marklogic.input.host</name>
        <value>ubuntu.localdomain</value>
    </property>
    <property>
        <name>mapreduce.marklogic.input.port</name>
        <value>8000</value>
    </property>
    <property>
        <name>mapreduce.marklogic.input.mode</name>
        <value>basic</value>
    </property>
    <property>
        <name>mapreduce.marklogic.input.valueclass</name>
        <value>com.marklogic.mapreduce.DatabaseDocument</value>
    </property>
    <property>
        <name>mapreduce.marklogic.output.username</name>
        <value>admin</value>
    </property>
    <property>
        <name>mapreduce.marklogic.output.password</name>
        <value>admin</value>
    </property>
    <property>
        <name>mapreduce.marklogic.output.host</name>
        <value>ubuntu.localdomain</value>
    </property>
    <property>
        <name>mapreduce.marklogic.output.port</name>
        <value>8000</value>
    </property>
    <property>
        <name>mapreduce.marklogic.output.content.type</name>
        <value>TEXT</value>
    </property>
</configuration>

I had tried by giving various names for this mapreduce.marklogic.input.host i tried with 127.0.0.1 & localhost but by default it is taking ubuntu.localdomain.

I dont know why it is taking default one rather than taking the one which i had specified in configuration.xml file (i.e.127.0.0.1 etc) .

I had used the below command to run this

hadoop jar \
  $CONNECTOR_HOME/lib/marklogic-mapreduce-examples-version.jar \
  com.marklogic.mapreduce.examples.HelloWorld -libjars $LIBJARS \
  -conf marklogic-hello-world.xml

As specifed in the document.

How can i overcome this ? Any help is appreciated ..

Thanks

Dave Cassel
  • 8,352
  • 20
  • 38
Private
  • 1,661
  • 1
  • 20
  • 51

1 Answers1

0

Resolved the issue by changing the localhost name in Marklogic configuration page from ubuntu.localdomain to localhost then the above configuration worked well. But Still cant able to find why it is not picking hostname from configuration files rather then going to ML .

Private
  • 1,661
  • 1
  • 20
  • 51
  • The name of a server is not always the same as how it is known on a network. Are you sure `ubuntu.localdomain` is also the name how your server can be access over network? Check your local DHCP and/or DNS server how it is logged there to verify. Localhost will just always work if things are running on the same server, so less complicated. – grtjn Jan 08 '18 at 20:07