Coder Social home page Coder Social logo

Comments (7)

Ishiihara avatar Ishiihara commented on July 24, 2024

@wjptak The connector should work with Hadoop HA. Here is a discussion on the connector works with HA: https://groups.google.com/forum/?utm_medium=email&utm_source=footer#!msg/confluent-platform/VPS79sqe84I/e74l_Gg-AgAJ

from kafka-connect-hdfs.

Ishiihara avatar Ishiihara commented on July 24, 2024

Closing this because it is not an issue.

from kafka-connect-hdfs.

wjptak avatar wjptak commented on July 24, 2024

@Ishiihara that's great news, we'll try this.

May I suggest to put this in the documentation? That would be very useful!

Thanks!

from kafka-connect-hdfs.

drdee avatar drdee commented on July 24, 2024

@Ishiihara does that mean that https://github.com/confluentinc/kafka-connect-hdfs/blob/master/src/main/java/io/confluent/connect/hdfs/HdfsSinkConnectorConfig.java#L40-L42 is outdated?

from kafka-connect-hdfs.

jecos avatar jecos commented on July 24, 2024

@Ishiihara I tried to use the HA name of the clusters in hdfs.url but i got this error :

INFO Couldn't start HdfsSinkConnector: (io.confluent.connect.hdfs.HdfsSinkTask) org.apache.kafka.connect.errors.ConnectException: java.lang.reflect.InvocationTargetException at io.confluent.connect.hdfs.storage.StorageFactory.createStorage(StorageFactory.java:31) at io.confluent.connect.hdfs.DataWriter.<init>(DataWriter.java:168) at io.confluent.connect.hdfs.HdfsSinkTask.start(HdfsSinkTask.java:64) at org.apache.kafka.connect.runtime.WorkerSinkTask.initializeAndStart(WorkerSinkTask.java:207) at org.apache.kafka.connect.runtime.WorkerSinkTask.execute(WorkerSinkTask.java:139) at org.apache.kafka.connect.runtime.WorkerTask.doRun(WorkerTask.java:140) at org.apache.kafka.connect.runtime.WorkerTask.run(WorkerTask.java:175) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.reflect.InvocationTargetException at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45) at java.lang.reflect.Constructor.newInstance(Constructor.java:422) at io.confluent.connect.hdfs.storage.StorageFactory.createStorage(StorageFactory.java:29) ... 11 more Caused by: java.lang.IllegalArgumentException: java.net.UnknownHostException: nameservice1 at org.apache.hadoop.security.SecurityUtil.buildTokenService(SecurityUtil.java:374) at org.apache.hadoop.hdfs.NameNodeProxies.createNonHAProxy(NameNodeProxies.java:312) at org.apache.hadoop.hdfs.NameNodeProxies.createProxy(NameNodeProxies.java:178) at org.apache.hadoop.hdfs.DFSClient.<init>(DFSClient.java:665) at org.apache.hadoop.hdfs.DFSClient.<init>(DFSClient.java:601) at org.apache.hadoop.hdfs.DistributedFileSystem.initialize(DistributedFileSystem.java:148) at org.apache.hadoop.fs.FileSystem.createFileSystem(FileSystem.java:2596) at org.apache.hadoop.fs.FileSystem.access$200(FileSystem.java:91) at org.apache.hadoop.fs.FileSystem$Cache.getInternal(FileSystem.java:2630) at org.apache.hadoop.fs.FileSystem$Cache.getUnique(FileSystem.java:2618) at org.apache.hadoop.fs.FileSystem.newInstance(FileSystem.java:417) at io.confluent.connect.hdfs.storage.HdfsStorage.<init>(HdfsStorage.java:39) ... 16 more Caused by: java.net.UnknownHostException: nameservice1 ... 28 more

In the constructor of HdfsStorage, fs is initialize with :

fs = FileSystem.newInstance(URI.create(url), conf);

It shouldn't use systematically this helper but rather this one :

fs = FileSystem.newInstance(conf);

In other words, use what is defined in the config hdfs-site.xml to init hdfs client

from kafka-connect-hdfs.

rnpridgeon avatar rnpridgeon commented on July 24, 2024

@jecos make sure you have set hadoop.conf.dir to a directory local to the worker which contains both hdfs-site.xml and core-site.xml. hdfs-site.xml provides all the necessary configs to utilize the ConfiguredFailoverProxyProvider while core-site.xml provides the value of defaultFS.

As long as both of these files are properly configured for HA HDFS and the task is able to pick them up you will be able to reference the nameservice id.

from kafka-connect-hdfs.

jecos avatar jecos commented on July 24, 2024

@rnpridgeon this is exactly what i done. But still get java.net.UnknownHostException: nameservice1.

This is what i have in the hdfs-site.xml :

  <property>
    <name>dfs.nameservices</name>
    <value>nameservice1</value>
  </property>
  <property>
    <name>dfs.client.failover.proxy.provider.nameservice1</name>
    <value>org.apache.hadoop.hdfs.server.namenode.ha.ConfiguredFailoverProxyProvider</value>
  </property>

And I configured the connector with :

     "hadoop.conf.dir": "/etc/hadoop/conf",
    "hdfs.url": "hdfs://nameservice1",

from kafka-connect-hdfs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.