Bir Storm topolojisinin çıkışını HA özellikli bir HDFS'ye yazmak için HdfsBolt
kullanmayı deniyorum. şöyle topolojisi tanımı:Fırtına: HDFS URI'yi HA HDFS ile HdfsBolt() içinde tanımlayın
// Use pipe as record boundary
RecordFormat format = new DelimitedRecordFormat().withFieldDelimiter("|");
//Synchronize data buffer with the filesystem every 1000 tuples
SyncPolicy syncPolicy = new CountSyncPolicy(1000);
// Rotate data files when they reach five MB
FileRotationPolicy rotationPolicy = new FileSizeRotationPolicy(5.0f, FileSizeRotationPolicy.Units.MB);
// Use default, Storm-generated file names
FileNameFormat fileNameFormat = new DefaultFileNameFormat().withPath("/foo");
HdfsBolt hdfsBolt = new HdfsBolt()
.withFsUrl("hdfs://devhdfs")
.withFileNameFormat(fileNameFormat)
.withRecordFormat(format)
.withRotationPolicy(rotationPolicy)
.withSyncPolicy(syncPolicy);
sorun HdfsBolt
hdfs://devhdfs
değerinin farkında değildir ve bu tetikleyen bir java.net.UnknownHostException
:
Caused by: java.lang.IllegalArgumentException: java.net.UnknownHostException: prehdfs
özgün çekirdek site.xml dosyasını sahip Bu tanımın bulunduğu, ancak HdfsBolt
'a nasıl geçeceğimi bilmiyorum. Herhangi bir ipucu?
Tek bir ana bilgisayar adı veremiyorum, çünkü HA özelliği etkin bir HDFS'dir. Tek bir ana bilgisayar adı verirsem, bu ana makine adı etkin NameNode ise çalışır. – Jander