Member since
04-04-2016
147
Posts
40
Kudos Received
16
Solutions
My Accepted Solutions
Title | Views | Posted |
---|---|---|
1167 | 07-22-2016 12:37 AM | |
4197 | 07-21-2016 11:48 PM | |
1601 | 07-21-2016 11:28 PM | |
2224 | 07-21-2016 09:53 PM | |
3316 | 07-08-2016 07:56 PM |
07-26-2016
12:58 PM
Very neatly explained.!
... View more
07-20-2016
02:44 AM
@sujitha sanku Here are some thought. Your right data in HDFS is immutable; however, with hive acid and phoenix/hbase you are able to update data. There are internal workings without those products which allow to update data. However at the core data exist in hdfs is not truly updated. It gives the perception. Hence why there is such thing as major/minor compaction. Not going to go into too much detail on that. So if data is updated in hbase, you can use NiFi to detect when a record is changed and based on that create a alert. As for hive/acid I am not aware of similar functionality. However products at attunity have functionality for CDC on hadoop. I would reach out to them. if that is not possible them you can build functionality to do some change tracking. It would be a custom solution. again that is for hive.
... View more
07-19-2016
01:22 AM
Hi @sujitha sanku The administration tool is Ambari. You can share the details from Ambari docs on how much details you want to share. Thanks
... View more
01-18-2017
10:25 AM
Hello. I did the similar stuff and it works fine when starting\stopping service. But for restart it fails. Looks like it runs status check after stop and status check fails because pid file is already deleted: Traceback (most recent call last):
File "/var/lib/ambari-agent/cache/stacks/HDP/2.5/services/CATALOGER/package/scripts/application.py", line 28, in <module>
Master().execute()
File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 280, in execute
method(env)
File "/usr/lib/python2.6/site-packages/resource_management/libraries/script/script.py", line 709, in restart
self.status(env)
File "/var/lib/ambari-agent/cache/stacks/HDP/2.5/services/CATALOGER/package/scripts/application.py", line 25, in status
Execute ( format("cat {pid_file}") );
File "/usr/lib/python2.6/site-packages/resource_management/core/base.py", line 155, in __init__
self.env.run()
File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 160, in run
self.run_action(resource, action)
File "/usr/lib/python2.6/site-packages/resource_management/core/environment.py", line 124, in run_action
provider_action()
File "/usr/lib/python2.6/site-packages/resource_management/core/providers/system.py", line 273, in action_run
tries=self.resource.tries, try_sleep=self.resource.try_sleep)
File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 71, in inner
result = function(command, **kwargs)
File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 93, in checked_call
tries=tries, try_sleep=try_sleep)
File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 141, in _call_wrapper
result = _call(command, **kwargs_copy)
File "/usr/lib/python2.6/site-packages/resource_management/core/shell.py", line 294, in _call
raise Fail(err_msg)
resource_management.core.exceptions.Fail: Execution of 'cat /opt/app/application.pid' returned 1. cat: /opt/app/application.pid: No such file or directory
... View more
07-14-2016
06:52 PM
Hi @ghost k, If this resolved your problem can you please vote the best answer. Thanks, Sujitha
... View more
07-06-2016
11:02 AM
Yes @sujitha sanku. Nifi was running fine and I have create twitter id as well. Actually there was a firewall problem, now I am able to run it through my personal internet. Thanks for your response.
... View more
07-01-2016
08:55 AM
1 Kudo
Hive, Pig (by means of PigStorage), and Spark all support UTF-8. However, it's not easy to say which languages are completely supported by UTF-8, because, for example some rarely used CJK characters (like in historical texts) outside of the so-called Basic Multilingual Plane (BMP) are not well supported in practice. Therefore, it's better to list up the languages you plan to use, and ask are they supported. In summary, if a language alphabet is completely included in BMP then it's completely supported. Edit: For a cool reading (over the weekend?) see this: Would UTF-8 be able to support the inclusion of a vast alien language with millions of new characters?
... View more
06-24-2016
12:41 AM
2 Kudos
How to make Mysql Database
as Hive’s instance: Install Mysql if not available: brew update brew doctor brew upgrade brew install
mysql mysql.server
restart mysql_secure_installation login to mysql
-> mysql –u root –p Enter password: Happy Mysql
learning…. Mysql is
already installed on Hortonworks sandbox. Steps: Confirm with mysql –u root –p Import an already
available database into Mysql: Ref: https://dev.mysql.com/doc/employee/en/employees-installation.html shell> tar -xjf
$HOME/Downloads/employees_db-full-1.0.6.tar.bz2 shell> cd employees_db/ shell> mysql -t <
employees.sql With this installation of
employee db in mysql is complete. Configuration
of Mysql Instance with Hive: From
HIVE create Mysql metastore [root@host]#
mysqladmin -u root create hivedb mysql>
USE hivedb; mysql>
CREATE USER 'hive'@'localhost' IDENTIFIED BY 'hive'; mysql>
GRANT ALL PRIVILEGES ON *.* TO 'hive'@'localhost'; With
this we confirm that mysql database is the Hive’s new metastore. Suppose to perform a full import of the ‘employees’
and ‘salaries’ tables into HDP: Tables created in
Hive Create database employees; Use employees; CREATE EXTERNAL TABLE IF NOT EXISTS employees ( emp_no INT, birth_date DATE, first_name
VARCHAR(14), last_name
VARCHAR(16), gender STRING, hire_date DATE ) STORED AS TEXTFILE; CREATE TABLE IF NOT EXISTS salaries ( emp_no INT, salary INT, from_date DATE, to_date DATE ) STORED AS TEXTFILE; sqoop import --connect
jdbc:mysql://172.16.16.128:3306/employees --username=hive --password=hive
--driver com.mysql.jdbc.Driver --table=employees --hive-import
--hive-table=empl.employees --target-dir=wp_users_import –direct sqoop import --connect
jdbc:mysql://172.16.16.128:3306/employees --username=hive --password=hive
--driver com.mysql.jdbc.Driver --table=employees --hive-import
--hive-table=empl.salaries --target-dir=wp_users_import –direct Suppose we need to perform some cleansing of data
using Regex expressions of Hive: use empl; drop table
empl.empl_clean; show tables; create table
empl.empl_clean(emp_no INT, birth_date STRING, first_name STRING, last_name STRING,gender
STRING, hire_date STRING ); insert overwrite table
empl.empl_clean SELECT regexp_replace(employees.emp_no,
'\t', '')emp_no, regexp_replace(employees.birth_date,
'\t', '')birth_date, regexp_replace(employees.first_name,
'\t', '')first_name, regexp_replace(employees.last_name,
'\t', '')last_name, regexp_replace(employees.gender,
'\t', '')gender, regexp_replace(employees.hire_date,
'\t', '')hire_date from empl.employees; select * from
empl.empl_clean limit 100; Cleansing the
salaries table: use empl; drop table
empl.salary_clean; create table
empl.salary_clean(emp_no INT,salary INT, from_date STRING, to_date STRING); insert overwrite table
empl.salary_clean SELECT regexp_replace(salaries.emp_no,
'\t', '')emp_no, regexp_replace(salaries.salary,
'\t', '')salary, regexp_replace(salaries.from_date,
'\t', '')from_date, regexp_replace(salaries.to_date,
'\t', '')to_date from empl.salaries; select * from
empl.salary_clean limit 100; Happy Learning….
... View more
Labels:
06-21-2016
08:59 PM
6 Kudos
SQOOP CONNECTIONS: Sqoop
is a tool designed to transfer data between Hadoop and relational databases.
You can use Sqoop to import data from a relational database management system
(RDBMS) such as MySQL or Oracle into the Hadoop Distributed File System (HDFS),
transform the data in Hadoop MapReduce, and then export the data back into an
RDBMS. Reference: sqoop user guide: https://sqoop.apache.org/docs/1.4.0-incubating/SqoopUserGuide.html JDBC ORACLE:
Examples for Import: sqoop-import
--connect jdbc:oracle:thin:@db.test.com:PORT:INSTANCE_NAME --table
DW_DATAMART.HCM_EMPLOYEE_D --fields-terminated-by '\t' --lines-terminated-by
'\n' --username SSANKU -P sqoop-import
--connect jdbc:oracle:thin:@db.test.com:PORT:INSTANCE_NAME --table
DW_DATAMART.HCM_EMPLOYEE_D --fields-terminated-by '\t' --lines-terminated-by
'\n' --username SSANKU -P JDBC ORACLE: Example
for Select: The eval tool allows users to quickly run simple SQL queries
against a database; results are printed to the console. This allows users to
preview their import queries to ensure they import the data they expect. sqoop-eval
--connect jdbc:oracle:thin:@db.test.com:PORT:INSTANCE_NAME --select * from
DW_DATAMART.HCM_COMPANY_D JDBC INFORMIX:
example JDBC Informix:
Examples for Import: sqoop-import
--connect jdbc:informix-sqli://4jane.soi.com:15062/common:INFORMIXSERVER=ids_4jane
--driver com.informix.jdbc.IfxDriver --table portal_request_params –username
username -P Sqoop Import to HBASE table: Examples: sqoop-import
--connect jdbc:oracle:thin:@db.test.com:PORT:INSTANCE_NAME --username ssanku
--P --table DW_DATAMART.PAY_PAY_CHK_OPTION_D --hbase-table
DW_DATAMART.PAY_PAY_CHK_OPTION_D --column-family cf1 --hbase-create-table If no primary key defined on the
oracle table sqoop-import
--connect jdbc:oracle:thin:@db.test.com:1725:hrlites --username ssanku --P
--table PSMERCHANTID --hbase-table PSMERCHANTID --column-family cf
--hbase-row-key MERCHANTID --hbase-create-table --split-by MERCHANTID sqoop-import
--connect jdbc:oracle:thin:@db.test.com:PORT:INSTANCE_NAME --username ssanku
--P --table DW_DATAMART.PAY_PAYGROUP_D --hbase-table DW_DATAMART.PAY_PAYGROUP_D
--column-family cf1 --hbase-create-table
sqoop-import
--connect jdbc:oracle:thin:@db.test.com:1725:hrlites --username ssanku --P
--table PSMERCHANTID --hbase-table PSMERCHANTID --column-family cf
--hbase-create-table --split-by MERCHANTID Sqoop Import to HIVE table from Mysql
Database: Examples: sqoop
import --connect jdbc:mysql://172.16.16.128:3306/employees -- username=hive
--password=hive --driver com.mysql.jdbc.Driver --table=employees -- hive-import
--hive-table=empl.employees --target-dir=wp_users_import –direct sqoop import --connect jdbc:mysql://172.16.16.128:3306/employees --
username=hive --password=hive --driver com.mysql.jdbc.Driver --table=employees
-- hive-import --hive-table=empl.salaries --target-dir=wp_users_import --direct
... View more
Labels:
- « Previous
-
- 1
- 2
- Next »