Comments (7)
@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.
Closing this because it is not an issue.
from kafka-connect-hdfs.
@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.
@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.
@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.
@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.
@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)
- Issue in a Kerberized environment a day after renew ticket HOT 2
- Explain limitation listed in the documentation HOT 3
- using wrong user/keytab while there are multiple hdfs-sink connections HOT 1
- template file isn't committed and uploaded to storage when using AvroFormat
- java.util.ConcurrentModificationException during task rebalancing HOT 1
- log4j update schedule HOT 1
- Hive table does not match column names present in the parquet data
- Exception when reading Decimal types written by connector
- Hive Merge Feature
- Incremental Co-operative Rebalancing Support for HDFS Connector
- Error after install and unistall connect-transforms
- Adding Hive partition threw unexpected error
- HDFS2 connect compatibility with HDFS3 server
- CVE-2021-34538 HIGH vulnerability HOT 2
- Task is being killed and will not recover until manually restarted
- Allow to limit retry write errors by timeout
- Kafka Issue while running on docker and adding new connector HOT 1
- can't build because repo conjars is down
- multiple keytab kerberos issue HOT 1
- OzoneFileSystem
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kafka-connect-hdfs.