Quantcast
Channel: Hortonworks » All Topics
Viewing all 5121 articles
Browse latest View live

Unable to instantiate UDF implementation class

$
0
0

Replies: 0

I created the my first below udf and added to the hdp 2.2.4 sandbox.


package org.learn.hive;

import org.apache.hadoop.hive.ql.exec.UDF;
import org.apache.hadoop.io.Text;

class ToUpper extends UDF {

public Text evaluate(Text input) {
if(input == null) return null;
return new Text(input.toString().toUpperCase());
}
}

hive> add jar /root/revin/hive-to-upper-udf.jar;
Added [/root/revin/hive-to-upper-udf.jar] to class path
Added resources: [/root/revin/hive-to-upper-udf.jar]
hive> CREATE TEMPORARY FUNCTION toUpper as 'org.learn.hive.ToUpper';
OK
Time taken: 0.054 seconds

hive> select toUpper(description) from sample_07 limit 1;

I am getting the following error

<b>
FAILED: SemanticException [Error 10014]: Line 1:7 Wrong arguments ‘description': Unable to instantiate UDF implementation class org.learn.hive.ToUpper: java.lang.IllegalAccessException: Class org.apache.hadoop.hive.ql.udf.generic.GenericUDFBridge can not access a member of class org.learn.hive.ToUpper with modifiers “”
</b>

Any inputs will be appreciated. Thanks.


Unable to connect to server

$
0
0

Replies: 3

Hi All,

I have downloaded the HDP2.2.4 sandbox for Oracle VM. I have fallowed the steps in the link : https://nitindubeybigdata.wordpress.com/mapreduce-wordcount-java/
to run the word count example.

I have setup the classpath as below

/usr/hdp/2.2.4.2-2/hadoop/client/hadoop-mapreduce-client-core.jar:/usr/hdp/2.2.4.2-2/hadoop/client/hadoop-common.jar

I am able to create the classfiles and the jar file. But while running it

===========
15/05/07 18:21:49 INFO client.RMProxy: Connecting to ResourceManager at sandbox.hortonworks.com/10.0.2.15:8050
15/05/07 18:21:51 INFO ipc.Client: Retrying connect to server: sandbox.hortonworks.com/10.0.2.15:8050. Already tried 0 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=50, sleepTime=1000 MILLISECONDS)
15/05/07 18:21:52 INFO ipc.Client: Retrying connect to server: sandbox.hortonworks.com/10.0.2.15:8050. Already tried 1 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=50, sleepTime=1000 MILLISECONDS)
==========

I am getting the above error. Do we have to change anything in the evironment file

Please help me here.

ODBC connection error 10060

$
0
0

Replies: 6

Hello,

I have been struggling with this for a while. I assume it is a network setup issue on the virtual machine, but haven’t been able to figure it out.

Host: Windows 8 laptop
VM: VirtualBox, Hortonworks Sandbox

VirtualBox Network Settings:
Host-only Adapter: 192.168.170.1, 255.255.255.0
DHCP Server: 192.168.170.1, 255.255.255.0, 192.168.170.101, 192.168.170.110

Virtual Machine Network Settings:
Adapter 1: NAT
Adapter 2: Host-only Adapter

After Virtual Machine startup, eth1 settings:
inet addr: 192.168.170.102

ODBC Driver settings (32-bit Windows):
Host: 192.168.170.102
Port: 10000
Database: default
Hive Server Type: Hive Server 2
Auth/Mechanism: User Name
User Name: sandbox

Results of ODBC Test:
Driver Version: V1.3.19.0013
Running connectivity tests…

Attempting connection
Failed to establish connection
SQLSTATE: HY000[Hortonworks][HiveODBC]
(34) Error from Hive: connect() failed: errno = 10060
TESTS COMPLETED WITH ERROR.

Thanks for your help,
Tom

Login Problems

$
0
0

Replies: 0

Hi,

I’m unable to set up the sandbox on my VM. It might not matter because I have it running on the host machine, but the VM is stuck on a password page.

It says “to login to the shell use: username root password hadoop” and then when I go to login, it won’t let me type anything for the password.

Thanks,
Sebastian

YARN Application Master unable to connect to Resource Manager

$
0
0

Replies: 1

I have a 4 node cluster (1 Namenode/Resource Manager 3 datanodes/node managers)

I am trying to run a simple tez example orderedWordCount hadoop jar C:\HDP\tez-0.4.0.2.1.1.0-1621\tez-mapreduce-examples-0.4.0.2.1.1.0-1621.jar orderedwordcount sample/test.txt /sample/out

The job gets accepted ,the Application master and container gets setup but on the nodemanager I see these logs
2014-09-10 17:53:31,982 INFO [ServiceThread:org.apache.tez.dag.app.rm.TaskSchedulerEventHandler] org.apache.hadoop.yarn.client.RMProxy: Connecting to ResourceManager at /0.0.0.0:8030
2014-09-10 17:53:34,060 INFO [ServiceThread:org.apache.tez.dag.app.rm.TaskSchedulerEventHandler] org.apache.hadoop.ipc.Client: Retrying connect to server: 0.0.0.0/0.0.0.0:8030. Already tried 0 time(s); retry policy is RetryUpToMaximumCountWithFixedSleep(maxRetries=10, sleepTime=1000 MILLISECONDS)

After configurable timeout the job fails

I searched for this problem and it always pointed to yarn.resourcemanager.scheduler.address configuration. In all my resource manager node and node managers I have this configuration defined correctly but for some reason its not getting picked up

<property>
<name>yarn.resourcemanager.hostname</name>
<value>10.234.225.69</value>
</property>
<property>
<name>yarn.resourcemanager.address</name>
<value>${yarn.resourcemanager.hostname}:8032</value>
</property>
<property>
<name>yarn.resourcemanager.webapp.address</name>
<value>${yarn.resourcemanager.hostname}:8088</value>
</property>
<property>
<name>yarn.resourcemanager.scheduler.address</name>
<value>${yarn.resourcemanager.hostname}:8030</value>
</property>
<property>
<name>yarn.resourcemanager.resource-tracker.address</name>
<value>${yarn.resourcemanager.hostname}:8031</value>
</property>
<property>
<name>yarn.resourcemanager.admin.address</name>
<value>${yarn.resourcemanager.hostname}:8033</value>
</property>

/hdp/apps folder is not getting created while installing HDP2.2 using Ambari 1.7

$
0
0

Replies: 2

Hi,

I have set up a HDP 2.2 cluster on AWS EC2 using Ambari 1.7.
The cluster is in Ireland region.
After the successful installation on execution of the command

hadoop fs -ls /

Found 7 items
drwxrwxrwx – yarn hadoop 0 2015-04-21 06:46 /app-logs
drwxr-xr-x – hdfs hdfs 0 2015-04-21 06:48 /apps
drwxr-xr-x – mapred hdfs 0 2015-04-21 06:46 /mapred
drwxr-xr-x – hdfs hdfs 0 2015-04-21 06:46 /mr-history
drwxr-xr-x – hdfs hdfs 0 2015-04-21 06:47 /system
drwxrwxrwx – hdfs hdfs 0 2015-04-21 06:49 /tmp
drwxr-xr-x – hdfs hdfs 0 2015-04-21 06:52 /user

It was found that /hdp/apps was not created.

As a result while running YARN job it throws FileNotFoundException.

Same setup was previously created on Frankfurt region where this directory was created.

Please guide me to overcome this issue.

Thanks

Pratik

Unable to rum this Scala example

$
0
0

Replies: 1

-first i am importing these after connecting to spark.

import org.apache.spark.SparkContext
import org.apache.spark.mllib.classification.SVMWithSGD
import org.apache.spark.mllib.evaluation.BinaryClassificationMetrics
import org.apache.spark.mllib.regression.LabeledPoint
import org.apache.spark.mllib.linalg.Vectors
import org.apache.spark.mllib.util.MLUtils

-then loading sample training data

val data = MLUtils.loadLibSVMFile(sc, “data/mllib/sample_libsvm_data.txt”)

-when i run this below command

val splits = data.randomSplit(Array(0.6, 0.4), seed = 11L)

– it gives me this error
“scala> <console>:16: error: not found: value data
val splits = data.randomSplit(Array(0.6, 0.4), seed = 11L)”

Suggestions Please

HMaster and HRegionServer not working

$
0
0

Replies: 0

Hello All, I had installed Hadoop 2.6.0 with Hbase 1.0. Have configured all the settings mentioned in the Apache Website for both hadoop and Hbase. Hadoop runs successfully, but when I Start HBase, I dont see both HMaster and HRegionServer in JPS. Please find below my config files:

<configuration>
<property>
<name>hbase.rootdir</name>
<value>hdfs://hadoopmaster:9000/hbase</value>
</property>
<property>
<name>hbase.tmp.dir</name>
<value>/tmp</value>
</property>
<property>
<name>hbase.cluster.distributed</name>
<value>true</value>
</property>
<property>
<name>hbase.zookeeper.quorum</name>
<value>localhost</value>
</property>
<property>
<name>dfs.replication</name>
<value>1</value>
</property>
<property>
<name>hbase.zookeeper.property.clientPort</name>
<value>2181</value>
</property>
<property>
<name>hbase.zookeeper.property.dataDir</name>
<value>/home/yarn/hbase/zookeeper</value>
</property>
<property>
<name>zookeeper.znode.parent</name>
<value>/hbase-unsecure</value>
</property>
<property>
<name>hbase.master</name>
<value>hadoopmaster:60000</value>
</property>
</configuration>

*********************************************

/etc/hosts

127.0.0.1 localhost hadoopmaster

# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters

Have been workin on this issue for past 2 days. Please let me know what is wrong?

Regards,


Sandbox : Hive Hbase Integration Problem

$
0
0

Replies: 0

Hi,
I am using a sandbox Virtual Machine and trying to migrate data into HIVE_ON_HBASE, ie., creating table on hive and inserting values into hbase using hbase api, therefore retrieving data from hive using following code :

import java.io.IOException;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;

import org.apache.commons.configuration.Configuration;
import org.apache.hadoop.hbase.HBaseConfiguration;
import org.apache.hadoop.hbase.client.HBaseAdmin;
import org.apache.hadoop.hbase.client.HTable;
import org.apache.hadoop.hbase.client.Put;
import org.apache.hadoop.hbase.util.Bytes;

public class HiveHbaseIntegration {
private static String driverName = “org.apache.hive.jdbc.HiveDriver”;

public static void main(String[] args) throws SQLException, IOException {
Connection con = null;
try {
Class.forName(driverName);
con = DriverManager.getConnection(“jdbc:hive2://192.168.135.133:10000/default”,”hive”,”hive”);
System.out.println(“connection is “+con);
Statement stmt = con.createStatement();
String tableName = “sample123″;
stmt.execute(“drop table if exists ” + tableName);
stmt.close();
String a=”create table ” + tableName + ” (eid string,ename string,esal string,deptid string) ” +
“STORED BY \’org.apache.hadoop.hive.hbase.HBaseStorageHandler\’ ” +
“WITH SERDEPROPERTIES(\’hbase.columns.mapping\’ = \':key,sample123:ename,sample123:esal,sample123:deptid\’) ” +
“TBLPROPERTIES(\’hbase.table.name\’ = \’sample123\’)”;

stmt = con.createStatement();
stmt.execute(a);
stmt.close();
System.out.println(“table created “);
org.apache.hadoop.conf.Configuration conf = HBaseConfiguration.create();
conf.set(“hbase.defaults.for.version.skip”, “true”);
conf.set(“hbase.zookeeper.quorum”, “192.168.135.133”);

conf.addResource(conf);
HBaseAdmin.checkHBaseAvailable(conf);
System.out.println(“HBase is Available and is Running “);

System.out.println(“confuguration for hbase is”+conf);
HTable table = new HTable(conf, “sample123″);
Put p=new Put(Bytes.toBytes(“1″));
System.out.println(“row in table”+p);
p.add(Bytes.toBytes(“sample123″), Bytes.toBytes(“ename”),Bytes.toBytes(“solix”));
p.add(Bytes.toBytes(“sample123″), Bytes.toBytes(“esal”),Bytes.toBytes(“1000″));
p.add(Bytes.toBytes(“sample123″), Bytes.toBytes(“deptid”),Bytes.toBytes(“1000″));
System.out.println(“After populating Put “+p);

System.out.println(“row in table”+p);
Put p1=new Put(Bytes.toBytes(“2″));
p1.add(Bytes.toBytes(“sample123″), Bytes.toBytes(“ename”),Bytes.toBytes(“solix1″));
p1.add(Bytes.toBytes(“sample123″), Bytes.toBytes(“esal”),Bytes.toBytes(“10001″));
p1.add(Bytes.toBytes(“sample123″), Bytes.toBytes(“deptid”),Bytes.toBytes(“10001″));
Put p3=new Put(Bytes.toBytes(“3″));
p3.add(Bytes.toBytes(“sample123″), Bytes.toBytes(“ename”),Bytes.toBytes(“solix12″));
p3.add(Bytes.toBytes(“sample123″), Bytes.toBytes(“esal”),Bytes.toBytes(“100011″));
p3.add(Bytes.toBytes(“sample123″), Bytes.toBytes(“deptid”),Bytes.toBytes(“100011″));
table.put(p);
table.put(p1);
table.put(p3);
System.out.println(“After table Put “+p);
table.flushCommits();
System.out.println(“FLUSH COMMITS EXECUTED”);

} catch (Exception e) {
e.printStackTrace();
}finally {
// con.close();
}

}
}

Where i am getting the exception is

org.apache.hadoop.hbase.MasterNotRunningException: org.apache.hadoop.hbase.MasterNotRunningException: The node /hbase is not in ZooKeeper. It should have been written by the master. Check the value configured in ‘zookeeper.znode.parent’. There could be a mismatch with the one configured in the master.
at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation$StubMaker.makeStub(ConnectionManager.java:1661)
at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation$MasterServiceStubMaker.makeStub(ConnectionManager.java:1687)
at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.getKeepAliveMasterService(ConnectionManager.java:1904)
at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.isMasterRunning(ConnectionManager.java:932)
at org.apache.hadoop.hbase.client.HBaseAdmin.checkHBaseAvailable(HBaseAdmin.java:2409)
at connections.HiveHbaseIntegration.main(HiveHbaseIntegration.java:47)
Caused by: org.apache.hadoop.hbase.MasterNotRunningException: The node /hbase is not in ZooKeeper. It should have been written by the master. Check the value configured in ‘zookeeper.znode.parent’. There could be a mismatch with the one configured in the master.
at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.checkIfBaseNodeAvailable(ConnectionManager.java:912)
at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.access$600(ConnectionManager.java:587)
at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation$StubMaker.makeStubNoRetries(ConnectionManager.java:1586)
at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation$StubMaker.makeStub(ConnectionManager.java:1633)
… 5 more

please help me to overcome the issue.

Error Importing sql sever data from sqoop

$
0
0

Replies: 0

Hi

I am importing data from sql server to hdfs and below is the command

sqoop import –connect “jdbc:sqlserver://Servername:1433;username=hadoop;password=Password;database=MSBI” –table DimDate –target-dir /Hadoop/hdpdatadn/dn/DW/msbi

but I am getting following error:

User: amit.tomar
Name: DimDate.jar
Application Type: MAPREDUCE
Application Tags:
State: FAILED
FinalStatus: FAILED
Started: Wed May 27 12:39:48 +0800 2015
Elapsed: 23sec
Tracking URL: History
Diagnostics: Application application_1432698911303_0005 failed 2 times due to AM Container for appattempt_1432698911303_0005_000002 exited with exitCode: 1
For more detailed output, check application tracking page:http://apsgsvdevsql01.ap.didata.local:8088/proxy/application_1432698911303_0005/Then, click on links to logs of each attempt.
Diagnostics: Exception from container-launch.
Container id: container_1432698911303_0005_02_000001
Exit code: 1
Stack trace: ExitCodeException exitCode=1:
at org.apache.hadoop.util.Shell.runCommand(Shell.java:538)
at org.apache.hadoop.util.Shell.run(Shell.java:455)
at org.apache.hadoop.util.Shell$ShellCommandExecutor.execute(Shell.java:715)
at org.apache.hadoop.yarn.server.nodemanager.DefaultContainerExecutor.launchContainer(DefaultContainerExecutor.java:212)
at org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.call(ContainerLaunch.java:302)
at org.apache.hadoop.yarn.server.nodemanager.containermanager.launcher.ContainerLaunch.call(ContainerLaunch.java:82)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Shell output: 1 file(s) moved.
Container exited with a non-zero exit code 1
Failing this attempt. Failing the application.

From the log below is the message:

java.lang.Exception: Unknown container. Container either has not started or has already completed or doesn’t belong to this node at all.

Thanks in advance

Spark 1.3 Upgarde on HDP-2.2.4.2-2

$
0
0

Replies: 3

I have successfully installed HDP-2.2.4.2-2 and spark 1.2 and now I have a requirement to test spark 1.3.1 integration with YARN and also integrate with Ambari / ZooKeeper.

Please advise if this is a viable option?

Thanks a lot in advance.

optimal size for hbase.hregion.memstore.flush.size

$
0
0

Replies: 0

Hi all,

We have a very high write heavy application. I would like to set a optimal value for the hbase.hregion.memstore.flush.size. It is mentioned that the size should be between 128 and 256 Mb.

I would like to know if I could set this to higher value, like 512 Mb or even 1 GB ? What is the impact of having this value higher?

Step by Step Guide to Run Ambari + Services

$
0
0

Replies: 1

Hi There

Any url related to start ambari in user mode, I use Ubuntu, the ambari-server run well.

I still have problem with Installation Wizard

still need to understand the FQDN model that need to prepare in Ambari, esp in 1 node and multiple node.

thx

Req:Hbase – Zookeeper Issue — High Priority

$
0
0

Replies: 0

Hi All,

I am using Sandbox for testing purpose. I trying to insert values into Hbase by creating a table in hive. we are using entire with hbase api and hive api.

Hive Table is creating successful but values are not getting insert into hbase table as error gives as

“org.apache.hadoop.hbase.MasterNotRunningException: org.apache.hadoop.hbase.MasterNotRunningException: The node /hbase is not in ZooKeeper. It should have been written by the master. Check the value configured in ‘zookeeper.znode.parent’. There could be a mismatch with the one configured in the master. ”

Could you please suggest what are the things or configurtions that need to change from the default setting in SANDBOX.

For an idea, please go through program

package connections;

import java.io.IOException;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;

import org.apache.commons.configuration.Configuration;
import org.apache.hadoop.hbase.HBaseConfiguration;
import org.apache.hadoop.hbase.client.HBaseAdmin;
import org.apache.hadoop.hbase.client.HTable;
import org.apache.hadoop.hbase.client.Put;
import org.apache.hadoop.hbase.util.Bytes;

public class HiveHbaseIntegration {
private static String driverName = “org.apache.hive.jdbc.HiveDriver”;

public static void main(String[] args) throws SQLException, IOException {
Connection con = null;
try {
Class.forName(driverName);
con = DriverManager.getConnection(“jdbc:hive2://192.168.135.133:10000/default”, “hive”, “hive”);
System.out.println(“connection is ” + con);
Statement stmt = con.createStatement();
String tableName = “sample123″;
stmt.execute(“drop table if exists ” + tableName);
stmt.close();
String a = “create table ” + tableName + ” (eid string,ename string,esal string,deptid string) ”
+ “STORED BY \’org.apache.hadoop.hive.hbase.HBaseStorageHandler\’ ”
+ “WITH SERDEPROPERTIES(\’hbase.columns.mapping\’ = \':key,sample123:ename,sample123:esal,sample123:deptid\’) ”
+ “TBLPROPERTIES(\’hbase.table.name\’ = \’sample123\’)”;

stmt = con.createStatement();
stmt.execute(a);
stmt.close();
System.out.println(“table created “);
org.apache.hadoop.conf.Configuration conf = HBaseConfiguration.create();
conf.set(“hbase.defaults.for.version.skip”, “true”);
conf.set(“hbase.zookeeper.quorum”, “192.168.135.133”);
conf.addResource(conf);

HBaseAdmin.checkHBaseAvailable(conf);
System.out.println(“HBase is Available and is Running “);

System.out.println(“confuguration for hbase is” + conf);
HTable table = new HTable(conf, “sample123″);
Put p = new Put(Bytes.toBytes(“1″));
System.out.println(“row in table” + p);
p.add(Bytes.toBytes(“sample123″), Bytes.toBytes(“ename”), Bytes.toBytes(“solix”));
p.add(Bytes.toBytes(“sample123″), Bytes.toBytes(“esal”), Bytes.toBytes(“1000″));
p.add(Bytes.toBytes(“sample123″), Bytes.toBytes(“deptid”), Bytes.toBytes(“1000″));
System.out.println(“After populating Put ” + p);
table.put(p);
table.put(p1);
table.put(p3);
System.out.println(“After table Put ” + p);
table.flushCommits();
System.out.println(“FLUSH COMMITS EXECUTED”);

} catch (Exception e) {
e.printStackTrace();
} finally {
// con.close();
}

}
}

Exception that obtaining is :

connection is org.apache.hive.jdbc.HiveConnection@560088f
table created
org.apache.hadoop.hbase.MasterNotRunningException: org.apache.hadoop.hbase.MasterNotRunningException: The node /hbase is not in ZooKeeper. It should have been written by the master. Check the value configured in ‘zookeeper.znode.parent’. There could be a mismatch with the one configured in the master.
at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation$StubMaker.makeStub(ConnectionManager.java:1661)
at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation$MasterServiceStubMaker.makeStub(ConnectionManager.java:1687)
at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.getKeepAliveMasterService(ConnectionManager.java:1904)
at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.isMasterRunning(ConnectionManager.java:932)
at org.apache.hadoop.hbase.client.HBaseAdmin.checkHBaseAvailable(HBaseAdmin.java:2409)
at connections.HiveHbaseIntegration.main(HiveHbaseIntegration.java:47)
Caused by: org.apache.hadoop.hbase.MasterNotRunningException: The node /hbase is not in ZooKeeper. It should have been written by the master. Check the value configured in ‘zookeeper.znode.parent’. There could be a mismatch with the one configured in the master.
at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.checkIfBaseNodeAvailable(ConnectionManager.java:912)
at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation.access$600(ConnectionManager.java:587)
at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation$StubMaker.makeStubNoRetries(ConnectionManager.java:1586)
at org.apache.hadoop.hbase.client.ConnectionManager$HConnectionImplementation$StubMaker.makeStub(ConnectionManager.java:1633)
… 5 more

Phoenix/hbase client

$
0
0

Replies: 2

I have Phoenix installed phoenix-4.3.1 and successfully connected to it to hbase via sqline
both on a machine that is part of the cluster as well as a machine that is not part of the cluster and has no hadoop components; just access to zookeeper
sqlline access is fine, but connecting via app (npm) via druid is running into an error

I found npm
https://github.com/gaodazhu/phoenix-client

I am getting the following

May 22, 2015 2:08:25 AM com.alibaba.druid.pool.DruidDataSource error
SEVERE: dataSource init error
java.sql.SQLException: org.apache.phoenix.jdbc.PhoenixDriver
at com.alibaba.druid.util.JdbcUtils.createDriver(JdbcUtils.java:514)
at com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:565)
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:878)
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:874)
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:97)
at com.mlsc.DBClient.query(DBClient.java:134)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
Caused by: java.lang.ClassNotFoundException: org.apache.phoenix.jdbc.PhoenixDriver
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:191)
at com.alibaba.druid.util.JdbcUtils.createDriver(JdbcUtils.java:512)
… 9 more

May 22, 2015 2:08:25 AM com.alibaba.druid.pool.DruidDataSource info
INFO: {dataSource-1} inited
java.sql.SQLException: org.apache.phoenix.jdbc.PhoenixDriver
at com.alibaba.druid.util.JdbcUtils.createDriver(JdbcUtils.java:514)
at com.alibaba.druid.pool.DruidDataSource.init(DruidDataSource.java:565)
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:878)
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:874)
at com.alibaba.druid.pool.DruidDataSource.getConnection(DruidDataSource.java:97)
at com.mlsc.DBClient.query(DBClient.java:134)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
Caused by: java.lang.ClassNotFoundException: org.apache.phoenix.jdbc.PhoenixDriver
at java.net.URLClassLoader$1.run(URLClassLoader.java:366)
at java.net.URLClassLoader$1.run(URLClassLoader.java:355)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
at java.lang.ClassLoader.loadClass(ClassLoader.java:425)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
at java.lang.ClassLoader.loadClass(ClassLoader.java:358)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:191)
at com.alibaba.druid.util.JdbcUtils.createDriver(JdbcUtils.java:512)


Unable to create Hbase table using Hive query through Spark

$
0
0

Replies: 0

Using the following tutorial, I was able to do the HBase integration with Hive. After the configuration I was successfully able to create Hbase table using Hive query with Hive table mapping.

Hive query:


CREATE TABLE upc_hbt(key string, value string) 
STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'
WITH SERDEPROPERTIES ("hbase.columns.mapping" = ":key,value:value")
TBLPROPERTIES ("hbase.table.name" = "upc_hbt");

Spark-Scala:


val createTableHql : String = s"CREATE TABLE upc_hbt2(key string, value string)"+
      "STORED BY 'org.apache.hadoop.hive.hbase.HBaseStorageHandler'"+
      "WITH SERDEPROPERTIES ('hbase.columns.mapping' = ':key,value:value')"+
      "TBLPROPERTIES ('hbase.table.name' = 'upc_hbt2')"

    hc.sql(createTableHql)

But when I execute the same Hive query through Spark it throws the following error:


Exception in thread "main" org.apache.spark.sql.execution.QueryExecutionException: FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. org.apache.hadoop.hive.ql.metadata.HiveException: Error in loading storage handler.org.apache.hadoop.hive.hbase.HBaseStorageHandler

It’s seem like during the Hive execution through Spark it can’t find the auxpath jar location. Is there anyway to solve this problem?

Thank you very much in advance.

Sqoop for AS400

$
0
0

Replies: 0

Hi I am trying to connect to an IBM iseries AS400 server

Command:
sqoop list-tables –driver com.ibm.as400.access.AS400JDBCDataSource –connect jdbc:as400://server:992/–username=name –password=pass

Warning: /usr/lib/sqoop/../accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
15/05/28 04:22:13 INFO sqoop.Sqoop: Running Sqoop version: 1.4.4.2.1.1.0-385
15/05/28 04:22:13 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.
15/05/28 04:22:13 WARN sqoop.ConnFactory: Parameter –driver is set to an explicit driver however appropriate connection manager is not being set (via –connection-manager). Sqoop is going to fall back to org.apache.sqoop.manager.GenericJdbcManager. Please specify explicitly which connection manager should be used next time.
15/05/28 04:22:13 INFO manager.SqlManager: Using default fetchSize of 1000
15/05/28 04:22:13 ERROR manager.SqlManager: Error reading database metadata: java.sql.SQLException: No suitable driver found for jdbc:as400://11.143.116.29:992/–username=rpceod
java.sql.SQLException: No suitable driver found for jdbc:as400://11.143.116.29:992/–username=rpceod
at java.sql.DriverManager.getConnection(DriverManager.java:596)
at java.sql.DriverManager.getConnection(DriverManager.java:233)
at org.apache.sqoop.manager.SqlManager.makeConnection(SqlManager.java:824)
at org.apache.sqoop.manager.GenericJdbcManager.getConnection(GenericJdbcManager.java:52)
at org.apache.sqoop.manager.SqlManager.listTables(SqlManager.java:466)
at org.apache.sqoop.tool.ListTablesTool.run(ListTablesTool.java:49)
at org.apache.sqoop.Sqoop.run(Sqoop.java:147)
at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:183)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:222)
at org.apache.sqoop.Sqoop.runTool(Sqoop.java:231)
at org.apache.sqoop.Sqoop.main(Sqoop.java:240)
Could not retrieve tables list from server
15/05/28 04:22:13 ERROR tool.ListTablesTool: manager.listTables() returned null

Get information using the commandline

$
0
0

Replies: 0

Hi,

there is plan to upgrade the Ambari cluster. I searched the documentation for some commandline examples to get some basic information without using the web at x.x.x.x:8080/login

So i’m interested in

– Ambari Version
– Hadoop Stack version
– Which services are installed
– where can i find those services (nodes)

sqoop as400 communication

$
0
0

Replies: 1

i am not able to export data from sqoop to as400 server. though i am able to import the data successfully.

i am using following command: –

sqoop export –driver com.ibm.as400.access.AS400JDBCDriver –connect jdbc:as400://178.249.3.21:23/MELLET1/TEXT4 –username MELLET –password mellet007 –table TEXT3 –export-dir /as400/1GBTBL5/part-m-00000 -m 1

i am getting timeout issue.

^C[root@sandbox sqoop]# sqoop export –driver com.ibm.as400.access.AS400JDBCDriver –connect jdbc:as400://178.249.3.21:23/MELLET1/TEXT4 –username MELLET –password mellet007 –table TEXT3 –export-dir /as400/1GBTBL5/part-m-00000 -m 1
Warning: /usr/hdp/2.2.0.0-2041/accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
15/05/10 17:41:48 INFO sqoop.Sqoop: Running Sqoop version: 1.4.5.2.2.0.0-2041
15/05/10 17:41:48 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead.
15/05/10 17:41:48 WARN sqoop.ConnFactory: Parameter –driver is set to an explicit driver however appropriate connection manager is not being set (via –connection-manager). Sqoop is going to fall back to org.apache.sqoop.manager.GenericJdbcManager. Please specify explicitly which connection manager should be used next time.
15/05/10 17:41:48 INFO manager.SqlManager: Using default fetchSize of 1000
15/05/10 17:41:48 INFO tool.CodeGenTool: Beginning code generation
15/05/10 17:41:52 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM TEXT3 AS t WHERE 1=0
15/05/10 17:41:53 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM TEXT3 AS t WHERE 1=0
15/05/10 17:41:54 INFO orm.CompilationManager: HADOOP_MAPRED_HOME is /usr/hdp/2.2.0.0-2041/hadoop-mapreduce
Note: /tmp/sqoop-root/compile/97bc551e81096ecaf161f3367edd2a90/TEXT3.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
15/05/10 17:42:00 INFO orm.CompilationManager: Writing jar file: /tmp/sqoop-root/compile/97bc551e81096ecaf161f3367edd2a90/TEXT3.jar
15/05/10 17:42:00 INFO mapreduce.ExportJobBase: Beginning export of TEXT3
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/usr/hdp/2.2.0.0-2041/hadoop/lib/slf4j-log4j12-1.7.5.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/hdp/2.2.0.0-2041/zookeeper/lib/slf4j-log4j12-1.6.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/usr/hdp/2.2.0.0-2041/hive/lib/hive-jdbc-0.14.0.2.2.0.0-2041-standalone.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.slf4j.impl.Log4jLoggerFactory]
15/05/10 17:42:02 INFO manager.SqlManager: Executing SQL statement: SELECT t.* FROM TEXT3 AS t WHERE 1=0
15/05/10 17:42:04 INFO impl.TimelineClientImpl: Timeline service address: http://sandbox.hortonworks.com:8188/ws/v1/timeline/
15/05/10 17:42:04 INFO client.RMProxy: Connecting to ResourceManager at sandbox.hortonworks.com/10.0.2.15:8050
15/05/10 17:42:06 INFO input.FileInputFormat: Total input paths to process : 1
15/05/10 17:42:06 INFO input.FileInputFormat: Total input paths to process : 1
15/05/10 17:42:06 INFO mapreduce.JobSubmitter: number of splits:1
15/05/10 17:42:07 INFO mapreduce.JobSubmitter: Submitting tokens for job: job_1431267418859_0014
15/05/10 17:42:07 INFO impl.YarnClientImpl: Submitted application application_1431267418859_0014
15/05/10 17:42:07 INFO mapreduce.Job: The url to track the job: http://sandbox.hortonworks.com:8088/proxy/application_1431267418859_0014/
15/05/10 17:42:07 INFO mapreduce.Job: Running job: job_1431267418859_0014
15/05/10 17:42:18 INFO mapreduce.Job: Job job_1431267418859_0014 running in uber mode : false
15/05/10 17:42:18 INFO mapreduce.Job: map 0% reduce 0%
15/05/10 17:42:37 INFO mapreduce.Job: map 100% reduce 0%
15/05/10 17:47:47 INFO mapreduce.Job: Task Id : attempt_1431267418859_0014_m_000000_0, Status : FAILED
AttemptID:attempt_1431267418859_0014_m_000000_0 Timed out after 300 secs
15/05/10 17:47:48 INFO mapreduce.Job: map 0% reduce 0%
15/05/10 17:48:07 INFO mapreduce.Job: map 100% reduce 0%
15/05/10 17:53:16 INFO mapreduce.Job: Task Id : attempt_1431267418859_0014_m_000000_1, Status : FAILED
AttemptID:attempt_1431267418859_0014_m_000000_1 Timed out after 300 secs
15/05/10 17:53:17 INFO mapreduce.Job: map 0% reduce 0%
15/05/10 17:53:40 INFO mapreduce.Job: map 100% reduce 0%
15/05/10 17:58:46 INFO mapreduce.Job: Task Id : attempt_1431267418859_0014_m_000000_2, Status : FAILED
AttemptID:attempt_1431267418859_0014_m_000000_2 Timed out after 300 secs

Store data to separate datanodes and grant access to specific datanodes

$
0
0

Replies: 0

Hi,
I have several applications using the same hadoop-cluster as data-storage. The different data of each application is stored directly at HDFS or at HDFS by Hive. I want to separate the data of each application “physical” at the cluster like {DataApplication1->DataNode1…5, DataApplication2->DataNode6…10, and so on}. Additional I’m searching for a possibility to grant/denied access to data-nodes like {ServiceUserApplication1->Access to DataNode1…5, ServiceUserApplication2->Access to DataNode6…10, and so on}.
For future the usecase may change to one big data pool for all applications. Then the data will be partitioned by Hive by application (e.g. partitioned by ApplicationID) and the need will be to store partitions at specific data nodes with access to this data nodes (partitoned data) for the ServiceUsers.

To solve the first part I found this Link, but don’t know if it is as dynamic as I need it.

Are there some features to support this usecases?

Viewing all 5121 articles
Browse latest View live


Latest Images