Member since
05-20-2016
155
Posts
220
Kudos Received
30
Solutions
My Accepted Solutions
Title | Views | Posted |
---|---|---|
5973 | 03-23-2018 04:54 AM | |
2159 | 10-05-2017 02:34 PM | |
1145 | 10-03-2017 02:02 PM | |
7753 | 08-23-2017 06:33 AM | |
2477 | 07-27-2017 10:20 AM |
09-19-2016
01:56 PM
With HDF 2.0, Ambari supports Nifi management, so all ( nifi , storm , kafka ) of these can be part of single cluster. Regarding HDF on yarn -- dont think thats there on the radar.
... View more
09-19-2016
08:45 AM
4 Kudos
Hello @Gerald Both, No, even in HDF 2.0 storm and Kafka runs as a standalone cluster and are not deployed on yarn. Thanks Santhosh
... View more
08-29-2016
11:41 AM
1 Kudo
@Teddy Brewski Can you please re-import the keytab file and try kinit on the new keytab ? Below is the command to fetch the keytab. kadmin.local -q "xst -k ~/yarn.service.keytab yarn/hdp-nn01.local.net@HADOOP.LOCAL"
... View more
08-29-2016
10:08 AM
@Teddy Brewski Looks like something is wrong with principal yarn/hdp-nn01.local.net@HADOOP.LOCAL. Can you please check whether the account exists in KDC or is it probably blocked ?. Run below command on the machine where your kdc server is running. kadmin.local -q "get_principal yarn/hdp-nn01.local.net@HADOOP.LOCAL"
... View more
08-29-2016
08:53 AM
@Teddy Brewski Can you please try kinit with the yarn.service.keytab and see whether it is successful. You will be able to get the yarn service principal using below command klist -kt /etc/security/keytabs/yarn.service.keytab
Take the principal name from the previous command and run kinit -kt /etc/security/keytabs/yarn.service.keytab ${yarn-service-principal-name}
... View more
08-24-2016
08:07 AM
2 Kudos
Try increasing the hive.tez.container.size property under hive config. Below is a very good article on how to configure memory setting for tez. https://community.hortonworks.com/articles/14309/demystify-tez-tuning-step-by-step.html
... View more
08-17-2016
06:54 AM
1 Kudo
while I could not find configuration to control the timeout, we trouble shooted the issue on why zookeeper was taking more 60secs and it turns that zookeeper was rate limiting the connection. Here is a good article which explains on the concepts. https://community.hortonworks.com/articles/51191/understanding-apache-zookeeper-connection-rate-lim.html We ended up figuring out the rogue app which was causing the connection leak to ZK.
... View more
08-16-2016
10:24 AM
2 Kudos
we are running an oozie hive2 action which discovers hiveserver2 via zookeeper. Below is the snippet of hive2 <hive2 xmlns="uri:oozie:hive2-action:0.1"> <prepare> <delete path="${WF_OUTPUT_PATH}-${wf:id()}/_query1"/> </prepare> <jdbc-url>jdbc:hive2://zookeeper:2181/table;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2</jdbc-url> <password>dummy</password> <script>queries/_query1.sql</script> <param>outputDir=${WF_OUTPUT_PATH}-${wf:id()}/_query1</param> <argument>--hiveconf</argument> <argument>tez.queue.name=${HIVE_QUEUE}</argument> <argument>--hiveconf</argument> <argument>hive.query.name=tpch_query1</argument> <argument>-i</argument> <argument>testbench.settings</argument> <file>testbench.settings</file> </hive2> The MR job which runs the hive query via beeline is failing because of connection timeout to zookeeper.
org.apache.curator.CuratorConnectionLossException: KeeperErrorCode = ConnectionLoss
at org.apache.curator.ConnectionState.checkTimeouts(ConnectionState.java:198)
at org.apache.curator.ConnectionState.getZooKeeper(ConnectionState.java:88)
at org.apache.curator.CuratorZookeeperClient.getZooKeeper(CuratorZookeeperClient.java:115)
at org.apache.curator.framework.imps.CuratorFrameworkImpl.getZooKeeper(CuratorFrameworkImpl.java:474)
at org.apache.curator.framework.imps.GetChildrenBuilderImpl$3.call(GetChildrenBuilderImpl.java:214)
at org.apache.curator.framework.imps.GetChildrenBuilderImpl$3.call(GetChildrenBuilderImpl.java:203)
at org.apache.curator.RetryLoop.callWithRetry(RetryLoop.java:107)
at org.apache.curator.framework.imps.GetChildrenBuilderImpl.pathInForeground(GetChildrenBuilderImpl.java:199)
at org.apache.curator.framework.imps.GetChildrenBuilderImpl.forPath(GetChildrenBuilderImpl.java:191)
at org.apache.curator.framework.imps.GetChildrenBuilderImpl.forPath(GetChildrenBuilderImpl.java:38)
at org.apache.hive.jdbc.ZooKeeperHiveClientHelper.configureConnParams(ZooKeeperHiveClientHelper.java:63)
at org.apache.hive.jdbc.Utils.configureConnParams(Utils.java:509)
at org.apache.hive.jdbc.Utils.parseURL(Utils.java:429)
at org.apache.hive.jdbc.HiveConnection.<init>(HiveConnection.java:134)
at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:105)
at java.sql.DriverManager.getConnection(DriverManager.java:664)
at java.sql.DriverManager.getConnection(DriverManager.java:208)
at org.apache.hive.beeline.DatabaseConnection.connect(DatabaseConnection.java:146)
at org.apache.hive.beeline.DatabaseConnection.getConnection(DatabaseConnection.java:211)
at org.apache.hive.beeline.Commands.close(Commands.java:1002)
at org.apache.hive.beeline.Commands.closeall(Commands.java:984)
at org.apache.hive.beeline.BeeLine.close(BeeLine.java:845)
at org.apache.hive.beeline.BeeLine.begin(BeeLine.java:792)
at org.apache.oozie.action.hadoop.Hive2Main.runBeeline(Hive2Main.java:266)
at org.apache.oozie.action.hadoop.Hive2Main.run(Hive2Main.java:240)
at org.apache.oozie.action.hadoop.LauncherMain.run(LauncherMain.java:51)
at org.apache.oozie.action.hadoop.Hive2Main.main(Hive2Main.java:58)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.apache.oozie.action.hadoop.LauncherMapper.map(LauncherMapper.java:242)
at org.apache.hadoop.mapred.MapRunner.run(MapRunner.java:54)
at org.apache.hadoop.mapred.MapTask.runOldMapper(MapTask.java:453)
at org.apache.hadoop.mapred.MapTask.run(MapTask.java:343)
at org.apache.hadoop.mapred.YarnChild$2.run(YarnChild.java:168)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:422)
at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1724)
at org.apache.hadoop.mapred.YarnChild.main(YarnChild.java:162)
2016-08-16 08:04:21,196 INFO [main] org.apache.zookeeper.ZooKeeper: Initiating client connection, connectString=zookeeper:2181 sessionTimeout=60000 watcher=org.apache.curator.ConnectionState@61d01788
2016-08-16 08:04:21,196 INFO [main-EventThread] org.apache.zookeeper.ClientCnxn: EventThread shut down
2016-08-16 08:04:21,199 INFO [main-SendThread(XXXX:2181)] org.apache.zookeeper.ClientCnxn: Opening socket connection to server XXXXX:2181. Will not attempt to authenticate using SASL (unknown error)
2016-08-16 08:04:21,199 INFO [main-SendThread(XXXX:2181)] org.apache.zookeeper.ClientCnxn: Socket connection established to XXXXX:2181, initiating session
2016-08-16 08:04:21,199 INFO [main-SendThread(XXXX:2181)] org.apache.zookeeper.ClientCnxn: Unable to read additional data from server sessionid 0x0, likely server has closed socket, closing socket connection and attempting reconnect
2016-08-16 08:04:21,745 INFO [main] org.apache.zookeeper.ZooKeeper: Session: 0x0 closed
2016-08-16 08:04:21,745 INFO [main-EventThread] org.apache.zookeeper.ClientCnxn: EventThread shut down
Is there any way to increase the timeout ? what would be the configuration for this.
... View more
Labels:
- Labels:
-
Apache Hive
-
Apache Oozie
08-12-2016
11:03 AM
1 Kudo
Found the hive shell logs at /tmp/{USER}/hive.log and figured out that the hive shell was OOMing. Increased the mem size and have restarted for now.
... View more
08-11-2016
10:05 PM
4 Kudos
Kafka from 0.9 onwards started support SASL_PLAINTEXT ( authentication and non-encrypted) for communication b/w brokers and consumer/produce r with broker. To know more about SASL, please refer to this link. Maven Dependency Add below maven dependency to your pom.xml
<dependency><br> <groupId>org.apache.kafka</groupId><br> <artifactId>kafka-clients</artifactId><br> <version>0.10.0.0</version><br></dependency>
2. Kerberos Setup Configure JAAS configuration file with contents as below KafkaClient {
com.sun.security.auth.module.Krb5LoginModule required
useTicketCache=true
principal="user@EXAMPLE.COM"
useKeyTab=true
serviceName="kafka"
keyTab="/etc/security/keytabs/user.headless.keytab";
};
Above configuration is set to use key tab and ticket cache. The Kakfa Client Producer use above info to get TGT and authenticates with Kafka broker. Note: a] Make sure the /etc/krb5.conf has realms mapping for "EXAMPLE.COM" and also the default_realm is set to "EXAMPLE.COM" under [libdefaults] section. Please refer this link for more information. b] Run below command and make sure it is successful kinit -kt /etc/security/keytabs/user.headless.keytab user@EXAMPLE.COM 3. Initialization Kafka Producer The Kafka Producer Client needs certain information to initialize itself. This can be provided either as a property file input or as a HashMap as below.
Properties properties = new Properties();
properties.put("bootstrap.servers","comma-seperated-list-of-brokers");
properties.put("key.serializer","org.apache.kafka.common.serialization.StringSerializer");// key serializer
properties.put("value.serializer","org.apache.kafka.common.serialization.StringSerializer"); //value serializer
properties.put("acks","1"); //message durability -- 1 mean ack after writing to leader is success. value of "all" means ack after replication.
properties.put("security.protocol","SASL_PLAINTEXT"); // Security protocol to use for communication.
properties.put("batch.size","16384");// maximum size of message
KafkaProducer<String,String> producer = new KafkaProducer<String, String>(properties);<br>
3. Push Message producer.send(new ProducerRecord<String, String>(", "key", "value"), new Callback() {
public void onCompletion(RecordMetadata metadata, Exception e) {
if (e != null) {
LOG.error("Send failed for record: {}", metadata);
}
else {
LOG.info("Message delivered to topic {} and partition {}. Message offset is {}",metadata.topic(),metadata.partition(),metadata.offset());
}
}
});
}
producer.close(); Above code pushes message to kafka broker and on completion( acked ) the method "onCompletion" is invoked. 4. Run While running this code add below VM params -Djava.security.auth.login.config=<PATH_TO_JAAS_FILE_CREATED_IN_STEP2> -Djava.security.krb5.conf=/etc/krb5.conf
... View more
Labels: