Member since
01-19-2017
3679
Posts
632
Kudos Received
372
Solutions
My Accepted Solutions
| Title | Views | Posted |
|---|---|---|
| 992 | 06-04-2025 11:36 PM | |
| 1564 | 03-23-2025 05:23 AM | |
| 780 | 03-17-2025 10:18 AM | |
| 2815 | 03-05-2025 01:34 PM | |
| 1856 | 03-03-2025 01:09 PM |
05-14-2019
11:01 AM
1 Kudo
@duong tuan anh There are a couple of issue with your Kafka configuration you are trying to run a 3 node cluster but using the same log directory that's the reason your broker is going down because it finds another process already writing it's log to that /kafka-logs. Note carefully the difference I have set down you will need to edit your server.properties like below on the 3 nodes and ONLY then will you successfully start your Kafka broker. Make sure you kill any running broker process so as not to have port conflicts !! Create 3 Server.properties files and place them on the respective node cp config/server.properties config/server-1.properties
cp config/server.properties config/server-2.properties On node1 config/server.properties:
broker.id=0
listeners=PLAINTEXT://node1:9092
log.dirs=/kafka-logs On node2 config/server-1.properties:
broker.id=1
listeners=PLAINTEXT://node2:9093
log.dirs=/kafka-logs-1 On node3 config/server-2.properties:
broker.id=2
listeners=PLAINTEXT://node3:9094
log.dirs=/kafka-logs-2 # The id of the broker. This must be set to a unique integer for each broker. In your case you should have broker.id=0 on node1,broker.id=2 ,broker.id=2 on node3 zookeeper.connect=am-bigdata-03.am.local:2181,am-bigdata-01.am.local:2181,am-bigdata-02.am.local:2181 The zookeeper ensemble should also have unique myid's On node1 echo "1" > $..../kafka/zookeeper/data/myid On node2 echo "2" > $..../kafka/zookeeper/data/myid On node3 echo "3" > $..../kafka/zookeeper/data/myid Now you can start your Kafka broker it should fire up Reference: https://kafka.apache.org/quickstart#quickstart_multibroker Please revert
... View more
05-14-2019
04:56 AM
@Shashank Naresh You should be able to do that under the network configuration for HDF Enable Network Adapter choose Attached to : NAT and the Name will be Blank for Adaptor 1 and for Adapter 2 enable Network Adapter Attached to: Bridged Adapter Name choose in the drop-down list either appropriate driver for LAN or Wireless depending on your case and repeat it for HDP. You should realize that HDP and HDF consume a lot of RAM so I hope you are running a 32 GB host machine Good luck
... View more
05-13-2019
07:04 PM
@Mazen Elshayeb There is something I don't understand can you share how you create the KDC database? How come you have a principal "ambari_hdfs-050819@HADOOP.COM"? I suggest starting afresh so delete/destroy the current KDC as the root user or sudo on ubuntu whichever is appropriate # sudo kdb5_util -r HADOOP.COM destroy Accept with a "Yes" Now create a new Kerberos database Complete remove Kerberos $ sudo apt purge -y krb5-kdc krb5-admin-server krb5-config krb5-locales krb5-user krb5.conf
$ sudo rm -rf /var/lib/krb5kdc
Do a refresh installation First, get the FQDN of your kdc server for this example # hostanme -f
test.hadoop.com Use the above output for a later set up # apt install krb5-kdc krb5-admin-server krb5-config Proceed as follow At the prompt for the Kerberos Realm = HADOOP.COM
Kerberos server hostname = test.hadoop.com
Administrative server for Kerberos REALM = test.hadoop.com Configuring krb5 Admin Server # krb5_newrealm Open /etc/krb5kdc/kadm5.acl it should contain a line like this */admin@HADOOP.COM * The kdc.conf should be adjusted to look like this [kdcdefaults]
kdc_ports = 88
kdc_tcp_ports = 88
[realms]
HADOOP.COM = {
#master_key_type = aes256-cts
acl_file = /var/kerberos/krb5kdc/kadm5.acl
dict_file = /usr/share/dict/words
admin_keytab = /var/kerberos/krb5kdc/kadm5.keytab
supported_enctypes = aes256-cts:normal aes128-cts:normal des3-hmac-sha1:normal arcfour-hmac:normal camellia256-cts:normal camellia128-cts:normal des-hmac-sha1:normal des-cbc-md5:normal des-cbc-crc:normal
} The krb5.conf should look like this if you are on a multi-node cluster this is the fines you will copy to all other hosts, notice the entry under domain_realm? [libdefaults]
renew_lifetime = 7d
forwardable = true
default_realm = HADOOP.COM
ticket_lifetime = 24h
dns_lookup_realm = false
dns_lookup_kdc = false
default_ccache_name = /tmp/krb5cc_%{uid}
#default_tgs_enctypes = aes des3-cbc-sha1 rc4 des-cbc-md5
#default_tkt_enctypes = aes des3-cbc-sha1 rc4 des-cbc-md5
[domain_realm]
.hadoop.com = HADOOP.COM
hadoop.com = HADOOP.COM
[logging]
default = FILE:/var/log/krb5kdc.log
admin_server = FILE:/var/log/kadmind.log
kdc = FILE:/var/log/krb5kdc.log
[realms]
HADOOP.COM = {
admin_server = test.hadoop.com
kdc = test.hadoop.com
} Restart the Kerberos kdc daemons and kerberos admin servers: # for script in /etc/init.d/krb5*; do $script restart; done Don't manually create any principle like the "ambari_hdfs-050819@HADOOP.COM" Go to the ambari kerberos wizard for the domain notice the . (dot) kdc host = test.hadoop.com
Real Name = HADOOP.COM
Domains = .hadoop.com ,hadoop.com
-----
kadmin host = test.hadoop.com
Admin principal = admin/admin@HADOOP.COM
Admin password = password set during the creation of kdc database Now from here just accept the default the keytabs should generate successfully. I have attached files to guide you Procedure to Kerberize HDP 3.1_Part2.pdfProcedure to Kerberize HDP 3.1_Part1.pdf Procedure to Kerberize HDP 3.1_Part3.pdf Hope that helps please revert if you have any questions
... View more
05-13-2019
02:51 PM
@prashanth kanchamreddy In case of Netezza direct imports, Sqoop executes a CREATE EXTERNAL TABLE command (so you will needs CREATE EXTERNAL TABLE privilege) to create a backup of the content of the table to a temporary file and it copies the content of this file to the final output on HDFS. I have modified the script a bit it should create a hive table called kanchamreddy_hive in /data/xdl/dev/...../.../...._20190509/ it could error out because I have tested it against Netezza sqoop-import \
-D mapreduce.job.queuename=XDL \
-D mapreduce.task.timeout=60000 \
--verbose \
--connect jdbc:netezza://server/db \
--username username \
--password ***** \
--table table_name \
--where " a(SUBSTR(src_file_nm,23,8)like'20190104%')" \
--hive-table table_name_20190509 \
--create-hive-table \
--target-dir /data/xdl/dev/HIVE_SCHEMA/tgt.db \
--fields-terminated-by '\b' \
--num-mappers 8 \
--null-string '\\N' \
--null-non-string '\\N' \
--outdir /xdl_code/dev/LAND/CDR/TEMP \
--split-by fw_rec_nbr \
--direct Can you try that and revert!
... View more
05-13-2019
06:21 AM
1 Kudo
@Michael Bronson Yes, you can filter by days in the below example I filtering all jpg files older than 30 days and running the delete thereafter You can test by running first only find /path/to/files/ -type f -name '*.jpg' -mtime +30 then add the delete command find /path/to/files/ -type f -name '*.jpg' -mtime +30 -exec rm {} \; Hope that helps
... View more
05-13-2019
05:23 AM
@Banthita Limwilai Please can you elaborate I don't seem to understand you.
... View more
05-12-2019
07:05 AM
@Haijin Li I think there is a problem with your command the - (hyphen) is missing can you copy and paste the below $ sudo su - hive Please revert
... View more
05-10-2019
11:33 PM
@Banthita Limwilai Have you tried the hive user? Can you point me to this document "According to Kerberos, Hive user doesn't has permission" This is what I get when I true to access beeline as user hive [hive@osaka ~]$ beeline
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/hdp/3.1.0.0-78/hive/lib/log4j-slf4j-impl-2.10.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/hdp/3.1.0.0-78/hadoop/lib/slf4j-log4j12-1.7.25.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J: Actual binding is of type [org.apache.logging.slf4j.Log4jLoggerFactory]
Connecting to jdbc:hive2://osaka.com:2181/default;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2
Enter username for jdbc:hive2://osaka.com:2181/default: hive
Enter password for jdbc:hive2://osaka.com:2181/default: ****
Error: org.apache.hive.jdbc.ZooKeeperHiveClientException: Unable to read HiveServer2 configs from ZooKeeper (state=,code=0)
Beeline version 3.1.0.3.1.0.0-78 by Apache Hive
beeline> HTH
... View more
05-10-2019
10:37 PM
@prashanth kanchamreddy Can you share the sqoop command? Since the sqoop command doesn't fail ss the table create in hive?
... View more
05-10-2019
10:29 PM
@Michael Bergamini That doesn't matter thats why I mentionned "adjust depending on your environment" how much memory do have on the for hadoop & OS on the working node and the faulty one?
... View more