将ML 9与Connector-for-Hadoop2-2.2.3集成时,不是一个可用的网络地址错误?

时间:2018-01-05 06:56:49

标签: hadoop marklogic marklogic-9

遵循此ML documentation我正在使用文档中的配置运行示例marklogic-hello-world.xml。我的本地主机名是ubuntu.localdomain。当我在配置文件中给出相同的内容时,它会抛出这样的错误

    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

我的配置文件是这样的

<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>

我尝试过使用mapreduce.marklogic.input.host&{ 127.0.0.1但默认情况下需要localhost

我不知道为什么它采用默认的,而不是采用我在configuration.xml文件中指定的那个(即ubuntu.localdomain等)。

我使用了以下命令来运行此

127.0.0.1

如文件中所述。

我怎样才能克服这一点?任何帮助表示赞赏..

由于

1 个答案:

答案 0 :(得分:0)

通过将Marklogic配置页面中的localhost名称从ubuntu.localdomain更改为localhost解决了此问题,然后上述配置运行良好。但仍然无法找到为什么它不从配置文件中选择hostname而不是选择ML。