Find and share helpful community-sourced technical articles
Recently active
Introduction The Hortonworks Sandbox running on Azure requires opening ports a bit differently than when the sandbox is running locally on Virtualbox or Docker. We’ll walk through how to open a port in Azure so that outside connections make their way into the sandbox, which is a Docker container inside an Azure virtual machine. Note: There are multiple ways to open ports to a Docker container (i.e. the sandbox). This tutorial will cover the simplest method, which reinitializes the sandbox to its original state. In other words, you will lose all changes made to the sandbox. Prerequisites Deploying Hortonworks Sandbox on Microsoft Azure Outline SSH Into The Azure VM Add Ports to the Docker Script Remove the Current Sandbox Container) Restart the Azure VM (Optional) Add New Ports to the SSH Config SSH Into the Azure VM If you followed the previous tutorial, Deploying Hortonworks Sandbox on Microsoft Azure, this step is as easy as running: ssh azureSandbox
PROBLEM : When the property skip.header.line.count is enabled on tables with large text files (~100G), we can see that the tez.grouping* parameters are ineffective, spinning one container per file.EXAMPLE: We have a table with 10 files, 117.0 G A.txt 29.0 G B.txt 30.0 G C.txt 1.9 G D.txt 11.0 G E.txt 18.9 G F.txt 5.7 G G.txt 159.4 H.txt 2.4 G I.txt 214.4 M J.txt Created table on top of this data, using CREATE TABLE `tab1`( `opr_glbl_sku_id` string, `opr_loc_nbr` string, `wk_start_dt` string, `base_fcst` float) ... TBLPROPERTIES ( 'skip.header.line.count'='1') Set these params (below), after which expectation is at least 200G/0.5G= 400 containers should be launched. SET tez.grouping.min-size=53421772; SET tez.grouping.max-size=534217728; With tez as the execution engine an attempt to perform select count(*) on the table spins only 10 containers. Once we remove the skip.header.line.count', it launched about 540 containers, which is expected behavior.ROOT CAUSE : hive.tez.i
1. Determine the version of the source hive database (from old cluster): mysql> select * from VERSION; +--------+----------------+----------------------------+ | VER_ID | SCHEMA_VERSION | VERSION_COMMENT | +--------+----------------+----------------------------+ | 1 | 1.2.0 | Hive release version 1.2.0 | +--------+----------------+----------------------------+ 2. On the old clusters metastore Mysql Database, take a dump of the hive database mysqldump -u root hive > /data/hive_20161122.sql 3. Do a find and replace in the dump file for any host name from the old cluster and change them to the new cluster (i.e. namenode address). Be cautious if the target cluster is HA enabled, when replacing hostname/hdfs url.4. On the new cluster, stop the Hive Metastore service 5. Within MySQL, perform drop/create of the new hive database. mysql> drop database hive; create database hive; 7. Run the schematool to initialize the schema to the exact version of the hive schema on the ol
PROBLEM : Query fails with the below mentioned exception.ERROR :java.util.concurrent.FutureTask.run(FutureTask.java:262) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:745) Caused by: java.lang.RuntimeException: java.io.IOException: java.lang.NullPointerException at org.apache.hadoop.mapred.split.TezGroupedSplitsInputFormat$TezGroupedSplitsRecordReader.initNextRecordReader(TezGroupedSplitsInputFormat.java:192)at org.apache.hadoop.mapred.split.TezGroupedSplitsInputFormat$TezGroupedSplitsRecordReader.<init>(TezGroupedSplitsInputFormat.java:131)ROOT CAUSE : Query fails on a field of datatype timestamp within an ORC table having null values, provided Predicate push down is enabled. This is a known issue. Reference: https://hortonworks.jira.com/browse/BUG-47472WORKAROUND / RESOLUTION : This setting is whether to enable automatic
In this article, we will see how to perform the mirroring of Hive data and metadata using Falcon from source cluster to destination cluster. This article is based on HDP 2.5. Configure HiveConfigure source and target Hive by clicking “Hive” from the Ambari Services menu, then click “configs” to add following custom properties on Ambari UI by scroll down to “Custom hive-site”, click it and then click “Add Property”.Add following property name with value:hive.metastore.event.listeners = org.apache.hive.hcatalog.listener.DbNotificationListenerhive.metastore.dml.events = truePress OK to save the changes, then click Restart all the impacted services. Bootstrap Table and DBBefore creating Hive DR mirroring job to replicate Hive data/metadata for a DB or Table, it is required to perform initial bootstrap of Table and DB from source to target cluster. Table BootstrapFor bootstrapping table replication, do an EXPORT of the table in question at source cluster, distcp the export directory t
There are many ways to validate a json file against a avro schema to verify all is kosher. Sharing a practice I have been using for few years.Objective - Validate avro schema well bound to the json fileFirst you must have a avro schema and json file. From there download the latest a avro-tools jar. At the moment 1.8.1 is the latest avro-tools version jar available.Store the avro schema and json file in the same directory. Issue a wget to fetch the avro-tools jarwget http://www.us.apache.org/dist/avro/avro-1.8.1/java/avro-tools-1.8.1.jarHere is what the directory looks likeObjective Details - Validate avro schema student.avsc binds to student.jsonHow - Issue the followingjava -jar ./avro-tools-1.8.1.jar fromjson --schema-file YourSchemaFile.avsc YourJsonFile.json > AnyNameForYourBinaryAvro.avroUsing the student files example:java -jar ./avro-tools-1.8.1.jar fromjson --schema-file student.avsc student.json > student.avroValidation passed, a avro binary was created.Now as a la
After defining cluster roles for the users and groups, LogSearch UI is not accessible with login failure message for individual users and groups.Below was the error in logs - logsearch-audit.json{"level":"WARN","file":"LogsearchAuthenticationProvider.java","thread_name":"qtp1464642111-13","line_number":124,"log_message":"{\"principal\":\"sysair\",\"result\":\"denied\",\"reason\":\"Wrong password\",\"remote_ip\":\"192.168.0.201\",\"session\":\"1a52ertsmv7l31qpo3gl3hdsyt\",\"auth_class\":\"org.springframework.security.authentication.UsernamePasswordAuthenticationToken\",\"user\":\"sysair\"}","logger_name":"org.apache.ambari.logsearch.audit","logtime":"1483536859578"} logsearch.json{"level":"INFO","file":"LogsearchAuthenticationProvider.java","thread_name":"qtp1464642111-14","line_number":66,"log_message":"Authenticating user:sysair, userDetail\u003dorg.springframework.security.authentication.UsernamePasswordAuthenticationToken@b48163fb: Principal: sysair; Credentials: [PROTECTED]; Authen
OverviewI recently encountered a question where someone asked to see how you can do preemption across YARN queues when a spark job is beyond it's queue's min guarantee. They had seen this before with the Fair Scheduler and Map Reduce, but wanted to apply the same experience here but with Spark and the Capacity Scheduler. This how-to article describes how to setup this experience. Goal: Run large Spark jobs in two separate capacity queues to produce an equal share of resources for both jobs. Hardware: 5 Nodes of AWS EC2 r3.xlarge Cluster Configuration: HDP: 2.4.2, Spark: 1.6.1, 5 Node Managers, 20GB (20480MB) Yarn Containersyarn.scheduler.maximum-allocation-mb = 20480yarn.scheduler.minimum-allocation-mb = 2560 High Level Setup:1. Add preemption properties as per documentation2. Create Two YARN Queues with Fair OrderingChild queue “test1” with a min capacity of 50% and a max of 100%Child queue “test2” with a min capacity of 50% and a max of 100%Root queue with a fair ordering policy3.
If you upgrade to or install HDP 2.5.0 or later without first installing the Berkeley DB file, you will get the error "Unable to initialize Falcon Client object. Cause : Could not authenticate, Authentication failed". The information below has also been added to the Data Movement and Integration guide and other Hortonworks documentation.Prerequisite to Installing or Upgrading Falcon Starting with the HDP 2.5.0 release, customers must provide the free Berkeley DB JAR file, under the Oracle license, as part of a Falcon installation or upgrade. This applies to Ambari express or rolling upgrades, to manual upgrades, and to all installations of HDP 2.5.0 or later, if you are using the Falcon service. Following are both Ambari and manual instructions for downloading and installing the JAR.Ambari Install or Upgrade of Falcon If you are using the Falcon service, the following steps must be performed on all Ambari server hosts on the cluster, prior to installing or upgrading to HDP 2.5.0
SYMPTOM: While integrating Storm 1.0.1 to Elastic Search 5.0.0, the following error is observed:Exception in thread "main" java.lang.NoClassDefFoundError: org/elasticsearch/common/base/Preconditions at org.apache.storm.elasticsearch.common.EsConfig.<init>(EsConfig.java:62) at org.apache.storm.elasticsearch.common.EsConfig.<init>(EsConfig.java:49) at com.mz.pipeline.StreamToES5_1.main(StreamToES5_1.java:72) 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:498) at com.intellij.rt.execution.application.AppMain.main(AppMain.java:147) Caused by: java.lang.ClassNotFoundException: org.elasticsearch.common.base.Preconditions Following were the maven dependencies:<dependency> <groupId>org.apache.storm</groupId> <artifactId>storm-cor
SYMPTOM: For a Capacity Scheduler queue that specifies some groups in its acl_submit_applications property, a user who is not a member of any of those groups is still able to submit jobs to the queue. ROOT CAUSE: By default the root queue is allow-all, which results in all child queues defaulting to allow-all.The acl_submit_applications property is described as: The ACL which controls who can submit applications to the given queue. If the given user/group has necessary ACLs on the given queue or one of the parent queues in the hierarchy they can submit applications. ACLs for this property are inherited from the parent queue if not specified.SOLUTION: Set the root queue to deny-all, by entering a "space" for the value. Then set who to allow in the ACL for each child queue. For example:yarn.scheduler.capacity.root.acl_submit_applications= yarn.scheduler.capacity.root.default.acl_administer_jobs=appdevyarn.scheduler.capacity.root.default.acl_submit_applications=appdevyarn.scheduler.capac
PROBLEM DESCRIPTIONThe Oozie service check fails and the following error message is displayed in Ambari:stderr: /var/lib/ambari-agent/data/errors-12523.txtPython script has been killed due to timeout after waiting 300 secs There is no error in the stdout. The service check is terminated because the timeout (300 secs by default) is reached. CAUSEThis issue occurs when the time taken by Ambari to upload jar and workflow files to hdfs for Oozie service check takes longer than the timeout mentioned in the server settings.Example:Nodes in a cluster are configured on ipv4 proxy, which causes network slowness among nodes. Ambari uploads jar files and workflow files to the hdfs for Oozie service check, depending on network performance time required to upload these files exceeds 300 secs timeout.WORKAROUNDTo increase the timeout, find and update the timeout set in the metainfo.xml file located in Edit /var/lib/ambari-server/resources/common-services/OOZIE/your_version_number/metainfo.xml, RES
To configure Oozie workflow after enabling the ResourceManager HA, do the following: Find the YARN Resource Manager cluster id. To find the cluster id, Go to Ambari > YARN > configs Search for property yarn.resourcemanager.cluster-idAfter finding the cluster id, at the Job Property file, provide the YARN Resource Manager cluster id to the job _Tracker like the following:jobTracker= yarn-haSubmit the Oozie job using the modified job property file.
Does HBase replication guarantee consistency or snapshot-in-time?HBase replication works by propagating the WAL from the source cluster to the destination and is replayed asynchronously. Thus, it is eventually consistent.For snapshot functionality, consider taking a Snapshot on the source cluster and exporting that to the destination using the ExportSnapshot tool.Is there an option of enabling replication at the GLOBAL level rather than individually at the table level?HBase replication can be enabled at the table level or column family level onlyDoes enabling replication cause the table to be disabled?Check that the hbase.online.schema.update.enable in hbase-site.xmlis true. If so, then the table will not be disabled when turning on table replication.The default value is true so if the property is not set in hbase-site.xml, it is 'true'. Does HBase replication solve the problem of replicating a cluster which already has data to an empty cluster?Replication alone does not solve replica
Symptom:After adding additional configurations to Solr, the service fails with both 'no servers hosting shard' and 'OutOfMemoryError' errors. A restart will resolve the issue for some time and it will eventually hit the error again.Root Cause:In some versions, the default setting for max user processes for the infra-solr user is 1024, which may be set too low for certain use cases. Resolution:Increase the max user process user limit. This can be done by creating the file /etc/security/limits.d/infra-solr.conf on the solr node and setting the nproc property. For example if the new value chosen is 6000, the contents would be: infra-solr - nproc 6000
Symptom:The oldWALs directory stores WALs that are no longer needed for recovery. We have come across situations where the directory continually increases in size and the older WALs are not getting cleaned up.Root Cause:This can get filled up due to a bug where hbase.backup.enable is true by default in HDP-2.5.3Resolution:- Add the property to HBase Custom hbase-site:hbase.backup.enable=false- Restart HBase
ROOT CAUSE:kafka.metrics.reporters in Advanced Kafka-broker was pointing to Ganglia metrics reporter. kafka.metrics.reporters=kafka.ganglia.KafkaGangliaMetricsReporterRESOLUTION: Kafka.metrics.reporters is pointing to GangliaMetrics. It should be pointing to Ambari metrics like this: kafka.metrics.reporters=org.apache.hadoop.metrics2.sink.kafka.KafkaTimelineMetricsReporter You can modify the property via Ambari -> Kafka -> configs -> Advanced kafka-broker-> kafka.metrics.reporters and modify the property. Please save the changes and restart required services
SYMPTOM: Storm nimbus fails to come up after Ambari was upgraded to 2.4 version while on HDP 2.42016-11-22 13:29:43.066 [timer] b.s.d.nimbus [ERROR] Error when processing eventjava.lang.NullPointerException at clojure.lang.Numbers.ops(Numbers.java:961) ~[clojure-1.6.0.jar:?] at clojure.lang.Numbers.isZero(Numbers.java:90) ~[clojure-1.6.0.jar:?] at backtype.storm.util$partition_fixed.invoke(util.clj:892) ~[storm-core-0.10.0.2.4.0.0-169.jar:0.10.0.2.4.0.0-169] at clojure.lang.AFn.applyToHelper(AFn.java:156) ~[clojure-1.6.0.jar:?] at clojure.lang.AFn.applyTo(AFn.java:144) ~[clojure-1.6.0.jar:?] at clojure.core$apply.invoke(core.clj:624) ~[clojure-1.6.0.jar:?] at clojure.lang.AFn.applyToHelper(AFn.java:156) ~[clojure-1.6.0.jar:?] at clojure.lang.RestFn.applyTo(RestFn.java:132) ~[clojure-1.6.0.jar:?] at clojure.core$apply.invoke(core.clj:626) ~[clojure-1.6.0.jar:?] at clojure.core$partial$fn__4228.doInvoke(core.clj:2468) ~[clojure-1.6.0.jar:?] at clojure.lang.RestFn.invoke(RestFn.java:408)
We can configure multiple listeners by giving comma-separated list of URIs that Kafka will listen on. Please follow the steps below to implement this:1. Add the listeners as comma separated value in Ambari ->kafka->configs->listeners, for example:listeners=PLAINTEXT://myhost:6667, PLAINTEXTSASL://myhost:66682. Add ACL for 'Anonymous' user, because In PLAINTEXT connections user's identity is set to Anonymous. For example :$ bin/kafka-acls.sh --authorizer kafka.security.auth.SimpleAclAuthorizer --authorizer-properties zookeeper.connect=ambari-server:2181 --add --allow-principal User:Anonymous --producer --topic topic-oct3. Run the producer with security protocol set to PLAINTEXT to listen to PLAINTEXT and set it to PLAINTEXTSASL to listen to other listener, something like this:$ bin/kafka-console-producer.sh --broker-list ambari-server.support.com:6667 --topic topic-oct --security-protocol PLAINTEXT$ bin/kafka-console-producer.sh --broker-list ambari-server.support.com:6668 --t
PROBLEM: Enable GC logging for Zookeeper SOLUTION: When Using Ambari web UI: 1. Click on the Zookeeper Service 2. Click on Configs tab 3. Navigate to 'Advanced Zookeeper-env'4. Locate the setting 'zookeeper-env template' 5. Append the following to 'export SERVER_JVMFLAGS=-Xmx1024m' : -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:$ZOO_LOG_DIR/zookeeper.gc.`date +'%Y%m%d%H%M'`" To be precise it should look like :export SERVER_JVMFLAGS="-Xmx1024m -verbose:gc -XX:+PrintGCDetails -XX:+PrintGCDateStamps -Xloggc:$ZOOKEEPER_LOG_DIR/zookeeper.gc.`date +'%Y%m%d%H%M'`" 6. Save the changes and restart the Zookeeper service when prompted When the cluster is managed outside Ambari: 1. On application cluster node open zookeeper-env.sh 2. Append the above mentioned parameter to SERVER_JVMFLAGS values. You can find the zookeeper-env.sh at /etc/zookeeper/conf/
SYMPTOMS: When using the SelectHiveQL processor in Nifi to run hive queries, it does not use the specific yarn queue ('nifi') if it is configured as in the following HiveConnectionPool settings:jdbc:hive2://<server>:<port>;serviceDiscoveryMode=zooKeeper;zooKeeperNamespace=hiveserver2;auth=kerberos;principal=hive/_HOST@DOMAIN.COM;tez.queue.name=nifiFollowing is an example of queue setting in yarn capacity scheduler:yarn.scheduler.capacity.root.queues=default,nifiyarn.scheduler.capacity.root.default.user-limit-factor=1yarn.scheduler.capacity.root.default.state=RUNNINGyarn.scheduler.capacity.root.default.maximum-capacity=40yarn.scheduler.capacity.root.default.capacity=40yarn.scheduler.capacity.root.default.acl_submit_applications=yarnyarn.scheduler.capacity.root.capacity=100yarn.scheduler.capacity.root.acl_administer_queue=yarnyarn.scheduler.capacity.root.accessible-node-labels=*yarn.scheduler.capacity.node-locality-delay=40yarn.scheduler.capacity.maximum-applications=10000yar
From HDP-2.5 onwards Ranger installation with Ambari 2.4.0, supports uploading of solrconfig to zookeeper during start of Ranger Admin component. However once default solrconfig.xml is uploaded the modified solrconfig.xml is not uploaded again for the next Ranger Admin start.To upload modified solrconfig.xml, below manual steps needs to be followed.1) Edit solrconfig.xml: Ranger solrconfig.xml is located at /usr/hdp/current/ranger-admin/contrib/solr_for_audit_setup/conf/solrconfig.xml2) Upload modified solrconfig.xml under znode used by Ranger Audit: Znode can be found in property ranger.audit.solr.zookeepers as {zookeeper_host}:2181/znode under Ranger Audit Tab.NOTE: If Ranger is using Ambari Infra solr cloud then default znode is /infra-solr otherwise if it is using externally managed solr cloud znode is /ranger_audits Use below command to upload, need to also export JAVA_HOME=/usr/jdk64/jdk1.8.0_77/usr/lib/ambari-infra-solr-client/solrCloudCli.sh --zookeeper-connect-string {zookee
PROBLEM : Cloudbreak failed to start. SYMPTOM : We get the below error "bind already in use"ERROR :ERROR: for consul Cannot start container 8a0b07e6b35e7350656b54314f7023107f417c0e0031db28e91f6bfb7a245d6f: failed to create endpoint cbreak_consul_1 on network bridge: Error starting userland proxy: listen udp X.X.X.X: bind: address already in use Traceback (most recent call last): File "<string>", line 3, in <module> File "compose/cli/main.py", line 63, in main AttributeError: 'ProjectError' object has no attribute 'msg' docker-compose returned -1 ROOT CAUSE : Cloudbreak may have stale process and because there are some container still running from the previous run. RESOLUTION : Please run the following : cbd kill # check if all containers have stopped cbd start This should fix the issue.
screen-shot-2017-03-09-at-44439-pm.pngscreen-shot-2017-03-09-at-44200-pm.pngPlease use the REST-plugin tool to perform the deletion. Please find the attached screenshot on how to use it, and the instruction on how to use encoded password (string to the word Basic) REST-plugin : https://chrome.google.com/webstore/detail/advanced-rest-client/hgmloofddffdnphfgcellkdfbfbjeloo/related?hl=en-USYou can encode your password using this tool : http://base64-encoding.online-domain-tools.com/ Type in the format username:password to get the encoded password.
Why-Hive-rolling-restart-doesn-t-change-the-configurations-all-the-time?This completely depends on what configuration are you trying to change.For example : We changed the value of hive.exec.compress.output to true and restarted 1 hiveserver2 and when we checked beeline set hive.exec.compress.output the value got changed. 2. Then we changed the log4j property hive.root.logger value to Debug and then just restarted hiveserver2 but the change didn't take effect until we restart Hive metastore on the host 3. Then we changed hadoop.security.credential.provider.path this value but this didn't take effect until we refresh the client configs first and then restart metastore and Hiveserver2. (restart order is important)
Already have an account? Login
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.