<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="bbPress/1.0.3" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title>DataStax Support Forums &#187; Tag: hive - Recent Posts</title>
		<link>http://www.datastax.com/support-forums/tags/hive</link>
		<description>Software, Support, and Training for Apache Cassandra</description>
		<language>en-US</language>
		<pubDate>Wed, 19 Jun 2013 13:34:37 +0000</pubDate>
		<generator>http://bbpress.org/?v=1.0.3</generator>
		<textInput>
			<title><![CDATA[Search]]></title>
			<description><![CDATA[Search all topics from these forums.]]></description>
			<name>q</name>
			<link>http://www.datastax.com/support-forums/search.php</link>
		</textInput>
		<atom:link href="http://www.datastax.com/support-forums/rss/tags/hive" rel="self" type="application/rss+xml" />

		<item>
			<title>dipesh on "How do you use composite columns (from cassandra) in a hive table?"</title>
			<link>http://www.datastax.com/support-forums/topic/how-do-you-use-composite-columns-from-cassandra-in-a-hive-table/page/2#post-9072</link>
			<pubDate>Tue, 19 Feb 2013 17:02:21 +0000</pubDate>
			<dc:creator>dipesh</dc:creator>
			<guid isPermaLink="false">9072@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;Finally, I am back to this. Sorry for the delay.&#60;/p&#62;
&#60;p&#62;Composite Column Name = UTF8Type + LongType/IntegerType/UTF8Type&#60;br /&#62;
Note: For all above combinations of second column, I am getting the same exception.&#60;/p&#62;
&#60;p&#62;My Doubts:&#60;br /&#62;
- Looking at the exception log, &#34;value&#34; seems pretty odd. Is that a problem?&#60;br /&#62;
- createCompositeKey method in the UDF java code, value of third (end-of-component) and fourth (lastIsOne) is hard coded to '0' and 'true' respectively. Frankly, I didn't understand it completely, even when I read the java-doc of Composite type several times. Please advise.&#60;/p&#62;
&#60;p&#62;Here is the Exception from the Log:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;2013-02-19 22:15:32,802 null map = 100%,  reduce = 0%
[2013-02-19 22:15:34,916] FATAL {ExecReducer} -  org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row (tag=0) {&#38;quot;key&#38;quot;:{&#38;quot;_col0&#38;quot;:&#38;quot;CSCO&#38;quot;,&#38;quot;_col1&#38;quot;:&#38;quot;price&#38;quot;,&#38;quot;_col2&#38;quot;:1360821839400},&#38;quot;value&#38;quot;:{&#38;quot;_col0&#38;quot;:{&#38;quot;count&#38;quot;:1,&#38;quot;sum&#38;quot;:25.13}},&#38;quot;alias&#38;quot;:0}
	at org.apache.hadoop.hive.ql.exec.ExecReducer.reduce(ExecReducer.java:256)
	at org.apache.hadoop.mapred.ReduceTask.runOldReducer(ReduceTask.java:518)
	at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:419)
	at org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:256)
Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: java.io.IOException: InvalidRequestException(why:Not enough bytes to read value of component 0)
	at org.apache.hadoop.hive.ql.exec.FileSinkOperator.processOp(FileSinkOperator.java:603)
	at org.apache.hadoop.hive.ql.exec.Operator.process(Operator.java:471)
	at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:762)
	at org.apache.hadoop.hive.ql.exec.SelectOperator.processOp(SelectOperator.java:84)
	at org.apache.hadoop.hive.ql.exec.Operator.process(Operator.java:471)
	at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:762)
	at org.apache.hadoop.hive.ql.exec.SelectOperator.processOp(SelectOperator.java:84)
	at org.apache.hadoop.hive.ql.exec.Operator.process(Operator.java:471)
	at org.apache.hadoop.hive.ql.exec.Operator.forward(Operator.java:762)
	at org.apache.hadoop.hive.ql.exec.GroupByOperator.forward(GroupByOperator.java:959)
	at org.apache.hadoop.hive.ql.exec.GroupByOperator.processAggr(GroupByOperator.java:798)
	at org.apache.hadoop.hive.ql.exec.GroupByOperator.processOp(GroupByOperator.java:724)
	at org.apache.hadoop.hive.ql.exec.Operator.process(Operator.java:471)
	at org.apache.hadoop.hive.ql.exec.ExecReducer.reduce(ExecReducer.java:247)
	... 3 more
Caused by: java.io.IOException: InvalidRequestException(why:Not enough bytes to read value of component 0)
	at org.apache.hadoop.hive.cassandra.output.CassandraAbstractPut.commitChanges(CassandraAbstractPut.java:69)
	at org.apache.hadoop.hive.cassandra.output.CassandraPut.write(CassandraPut.java:139)
	at org.apache.hadoop.hive.cassandra.output.HiveCassandraOutputFormat$1.write(HiveCassandraOutputFormat.java:69)
	at org.apache.hadoop.hive.ql.exec.FileSinkOperator.processOp(FileSinkOperator.java:589)
	... 16 more&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Here is my UDF based on your sample code. &#60;/p&#62;
&#60;pre&#62;&#60;code&#62;package com.cisco.iep.hive.plugins;

import java.nio.ByteBuffer;

import org.apache.cassandra.utils.ByteBufferUtil;
import org.apache.hadoop.hive.ql.exec.UDF;
import org.apache.hadoop.io.BytesWritable;

public class WriteCompositeStringLong extends UDF{
	public BytesWritable evaluate(final String strCol, final Long longCol) {

		ByteBuffer byteBuff = createCompositeKey(strCol, longCol, 0, false);

		return new BytesWritable(byteBuff.array());
	}

	private ByteBuffer createCompositeKey(String strCol, Long longCol, int endOfComponent,
			boolean lastIsOne) {
		ByteBuffer bytes = ByteBufferUtil.bytes(strCol);
		int totalSize = 0;
		if (strCol != null) {
			totalSize += 2 + bytes.remaining() + 1;
			if (longCol != null) {
				totalSize += 2 + 8 + 1;
				if (endOfComponent != -1) {
					totalSize += 2 + 1 + 1;
				}
			}
		}

		ByteBuffer bb = ByteBuffer.allocate(totalSize);

		if (strCol != null) {
			bb.putShort((short) bytes.remaining());
			bb.put(bytes);
			bb.put(longCol == null &#38;amp;&#38;amp; lastIsOne ? (byte) 1 : (byte) 0);
			if (longCol != null) {
				//bb.putShort((short) 16);
				//bb.put(UUIDGen.decompose(intCol));
				bb.putShort((short) 8);	//8 for Long value
				bb.putLong(longCol);
				bb.put(endOfComponent == -1 &#38;amp;&#38;amp; lastIsOne ? (byte) 1 : (byte) 0);
				if (endOfComponent != -1) {
					// We are putting a byte only because our test use ints that
					// fit in a byte *and* IntegerType.fromString() will
					// return something compatible (i.e, putting a full int here
					// would break &#38;#039;fromStringTest&#38;#039;)
					bb.putShort((short) 1);
					bb.put((byte) endOfComponent);
					bb.put(lastIsOne ? (byte) 1 : (byte) 0);
				}
			}
		}
		bb.rewind();
		return bb;
	}
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;I could paste the all other missing pieces like Hive Create Table script, Source Table details etc. &#60;/p&#62;
&#60;p&#62;I feel guilty of not resolving this issue yet even after your so much help from you already.&#60;/p&#62;
&#60;p&#62;Really appreciate your time and help over this!!
&#60;/p&#62;</description>
		</item>
		<item>
			<title>dipesh on "How do you use composite columns (from cassandra) in a hive table?"</title>
			<link>http://www.datastax.com/support-forums/topic/how-do-you-use-composite-columns-from-cassandra-in-a-hive-table/page/2#post-8989</link>
			<pubDate>Mon, 11 Feb 2013 05:23:03 +0000</pubDate>
			<dc:creator>dipesh</dc:creator>
			<guid isPermaLink="false">8989@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;Thanks again, however I will need couple of more days to try out due to other priorities.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>alexliu on "How do you use composite columns (from cassandra) in a hive table?"</title>
			<link>http://www.datastax.com/support-forums/topic/how-do-you-use-composite-columns-from-cassandra-in-a-hive-table#post-8945</link>
			<pubDate>Wed, 06 Feb 2013 17:56:32 +0000</pubDate>
			<dc:creator>alexliu</dc:creator>
			<guid isPermaLink="false">8945@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;Here is composite column encoding according to the source code&#60;/p&#62;
&#60;p&#62;/*&#60;br /&#62;
 * The encoding of a CompositeType column name should be:&#60;br /&#62;
 *   &#38;lt;component&#38;gt;&#38;lt;component&#38;gt;&#38;lt;component&#38;gt; ...&#60;br /&#62;
 * where &#38;lt;component&#38;gt; is:&#60;br /&#62;
 *   &#38;lt;length of value&#38;gt;&#38;lt;value&#38;gt;&#38;lt;'end-of-component' byte&#38;gt;&#60;br /&#62;
 * where &#38;lt;length of value&#38;gt; is a 2 bytes unsigned short the and the&#60;br /&#62;
 * 'end-of-component' byte should always be 0 for actual column name.&#60;br /&#62;
 * However, it can set to 1 for query bounds. This allows to query for the&#60;br /&#62;
 * equivalent of 'give me the full super-column'. That is, if during a slice&#60;br /&#62;
 * query uses:&#60;br /&#62;
 *   start = &#38;lt;3&#38;gt;&#38;lt;&#34;foo&#34;.getBytes()&#38;gt;&#38;lt;0&#38;gt;&#60;br /&#62;
 *   end   = &#38;lt;3&#38;gt;&#38;lt;&#34;foo&#34;.getBytes()&#38;gt;&#38;lt;1&#38;gt;&#60;br /&#62;
 * then he will be sure to get *all* the columns whose first component is &#34;foo&#34;.&#60;br /&#62;
 * If for a component, the 'end-of-component' is != 0, there should not be any&#60;br /&#62;
 * following component. The end-of-component can also be -1 to allow&#60;br /&#62;
 * non-inclusive query. For instance:&#60;br /&#62;
 *   start = &#38;lt;3&#38;gt;&#38;lt;&#34;foo&#34;.getBytes()&#38;gt;&#38;lt;-1&#38;gt;&#60;br /&#62;
 * allows to query everything that is greater than &#38;lt;3&#38;gt;&#38;lt;&#34;foo&#34;.getBytes()&#38;gt;, but&#60;br /&#62;
 * not &#38;lt;3&#38;gt;&#38;lt;&#34;foo&#34;.getBytes()&#38;gt; itself.&#60;br /&#62;
 */&#60;/p&#62;
&#60;p&#62;here is a sample code to create encoding composite column&#60;/p&#62;
&#60;p&#62;    private ByteBuffer createCompositeKey(String s, UUID uuid, int i, boolean lastIsOne)&#60;br /&#62;
    {&#60;br /&#62;
        ByteBuffer bytes = ByteBufferUtil.bytes(s);&#60;br /&#62;
        int totalSize = 0;&#60;br /&#62;
        if (s != null)&#60;br /&#62;
        {&#60;br /&#62;
            totalSize += 2 + bytes.remaining() + 1;&#60;br /&#62;
            if (uuid != null)&#60;br /&#62;
            {&#60;br /&#62;
                totalSize += 2 + 16 + 1;&#60;br /&#62;
                if (i != -1)&#60;br /&#62;
                {&#60;br /&#62;
                    totalSize += 2 + 1 + 1;&#60;br /&#62;
                }&#60;br /&#62;
            }&#60;br /&#62;
        }&#60;/p&#62;
&#60;p&#62;        ByteBuffer bb = ByteBuffer.allocate(totalSize);&#60;/p&#62;
&#60;p&#62;        if (s != null)&#60;br /&#62;
        {&#60;br /&#62;
            bb.putShort((short) bytes.remaining());&#60;br /&#62;
            bb.put(bytes);&#60;br /&#62;
            bb.put(uuid == null &#38;amp;&#38;amp; lastIsOne ? (byte)1 : (byte)0);&#60;br /&#62;
            if (uuid != null)&#60;br /&#62;
            {&#60;br /&#62;
                bb.putShort((short) 16);&#60;br /&#62;
                bb.put(UUIDGen.decompose(uuid));&#60;br /&#62;
                bb.put(i == -1 &#38;amp;&#38;amp; lastIsOne ? (byte)1 : (byte)0);&#60;br /&#62;
                if (i != -1)&#60;br /&#62;
                {&#60;br /&#62;
                    // We are putting a byte only because our test use ints that fit in a byte *and* IntegerType.fromString() will&#60;br /&#62;
                    // return something compatible (i.e, putting a full int here would break 'fromStringTest')&#60;br /&#62;
                    bb.putShort((short) 1);&#60;br /&#62;
                    bb.put((byte)i);&#60;br /&#62;
                    bb.put(lastIsOne ? (byte)1 : (byte)0);&#60;br /&#62;
                }&#60;br /&#62;
            }&#60;br /&#62;
        }&#60;br /&#62;
        bb.rewind();&#60;br /&#62;
        return bb;&#60;br /&#62;
    }&#60;/p&#62;
&#60;p&#62;You need change your code to the same encoding as the composite column name
&#60;/p&#62;</description>
		</item>
		<item>
			<title>dipesh on "How do you use composite columns (from cassandra) in a hive table?"</title>
			<link>http://www.datastax.com/support-forums/topic/how-do-you-use-composite-columns-from-cassandra-in-a-hive-table#post-8942</link>
			<pubDate>Wed, 06 Feb 2013 16:58:47 +0000</pubDate>
			<dc:creator>dipesh</dc:creator>
			<guid isPermaLink="false">8942@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;Thanks alexliu!!&#60;/p&#62;
&#60;p&#62;I could get Composite Column working on SELECT statement, however got an exception when tried to write data into Composite Column using following hive script and custom UDF.&#60;/p&#62;
&#60;p&#62;Here is relevant log on Exception:&#60;/p&#62;
&#60;blockquote&#62;&#60;p&#62;
[2013-02-06 22:23:15,252] FATAL {ExecReducer} -  org.apache.hadoop.hive.ql.metadata.HiveException: Hive Runtime Error while processing row (tag=0) {&#34;key&#34;:{&#34;_col0&#34;:&#34;blr_01&#34;,&#34;_col1&#34;:1350465782,&#34;_col2&#34;:&#34;WARN&#34;},&#34;value&#34;:{&#34;_col0&#34;:1},&#34;alias&#34;:0}&#60;br /&#62;
	at org.apache.hadoop.hive.ql.exec.ExecReducer.reduce(ExecReducer.java:256)&#60;br /&#62;
	at org.apache.hadoop.mapred.ReduceTask.runOldReducer(ReduceTask.java:518)&#60;br /&#62;
	at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:419)&#60;br /&#62;
	at org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:256)&#60;br /&#62;
Caused by: org.apache.hadoop.hive.ql.metadata.HiveException: java.io.IOException: InvalidRequestException(why:Not enough bytes to read value of component 0)&#60;br /&#62;
	at org.apache.hadoop.hive.ql.exec.FileSinkOperator.processOp(FileSinkOperator.java:603)&#60;br /&#62;
...&#60;/p&#62;
&#60;/blockquote&#62;
&#60;p&#62;Here is my hive script:&#60;br /&#62;
&#60;pre&#62;&#60;code&#62;CREATE TEMPORARY FUNCTION setCompositeLongString AS
       &#38;#039;com.cisco.iep.hive.plugins.WriteCompositeLongString&#38;#039;; 

INSERT OVERWRITE TABLE TestTable
SELECT src_id,
  setCompositeLongString(cast(alert_time as BIGINT), severity),
  COUNT(alert_type)
FROM alert_instance
GROUP BY src_id,
  cast(alert_time as BIGINT),
  severity;&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;And here is custom UDF to write data into Composite Column:&#60;/p&#62;
&#60;pre&#62;&#60;code&#62;package com.cisco.iep.hive.plugins;

import java.io.ByteArrayOutputStream;
import java.nio.ByteBuffer;
import java.util.ArrayList;
import java.util.List;

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

public class WriteCompositeLongString extends UDF{

	public BytesWritable evaluate(final LongWritable l, final Text s) {

		List&#38;lt;byte[]&#38;gt; b = new ArrayList&#38;lt;byte[]&#38;gt;(2);
		b.add(longWritableToByteArray(l));
		b.add(textToByteArray(s));

		return new BytesWritable(makeComposite(b));
	}

	private byte[] textToByteArray(Text s){
		if(s==null){
			return null;
		}
		return s.getBytes();
	}

	private byte[] longWritableToByteArray(final LongWritable l){
		if(l==null){
			return null;
		}
		return ByteBuffer.allocate(Long.SIZE).putLong(l.get()).array();
	}

	private byte[] makeComposite(final List&#38;lt;byte[]&#38;gt; b) {
		ByteArrayOutputStream bos = new ByteArrayOutputStream();
		for (int i = 0; i &#38;lt; b.size(); i++) {
			bos.write((byte) ((b.get(i).length &#38;gt;&#38;gt; (7 + 1)) &#38;amp; 0xFF));
			bos.write((byte) (b.get(i).length &#38;amp; 0xFF));
			for (int j = 0; j &#38;lt; b.get(i).length; j++) {
				bos.write(b.get(i)[j] &#38;amp; 0xFF);
			}
			bos.write((byte) 0);
		}
		return bos.toByteArray();
	}
}&#60;/code&#62;&#60;/pre&#62;
&#60;p&#62;Please advise.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>alexliu on "How do you use composite columns (from cassandra) in a hive table?"</title>
			<link>http://www.datastax.com/support-forums/topic/how-do-you-use-composite-columns-from-cassandra-in-a-hive-table#post-8747</link>
			<pubDate>Mon, 28 Jan 2013 20:24:56 +0000</pubDate>
			<dc:creator>alexliu</dc:creator>
			<guid isPermaLink="false">8747@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;non-cql composite row key is the same format as a composite column.&#60;/p&#62;
&#60;p&#62;But cql composite row key is in  a little different format, so you should modify the UDF for cql composite row key.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>alexliu on "How do you use composite columns (from cassandra) in a hive table?"</title>
			<link>http://www.datastax.com/support-forums/topic/how-do-you-use-composite-columns-from-cassandra-in-a-hive-table#post-8746</link>
			<pubDate>Mon, 28 Jan 2013 19:24:07 +0000</pubDate>
			<dc:creator>alexliu</dc:creator>
			<guid isPermaLink="false">8746@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;you should be able to do the same to Composite Row Key, because that composite row key is stored the same format as composite column.&#60;/p&#62;
&#60;p&#62;Basically you retrieve the key as binary data, then use UDF to retrieve/parse the data.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>dipesh on "How do you use composite columns (from cassandra) in a hive table?"</title>
			<link>http://www.datastax.com/support-forums/topic/how-do-you-use-composite-columns-from-cassandra-in-a-hive-table#post-8593</link>
			<pubDate>Wed, 23 Jan 2013 06:38:08 +0000</pubDate>
			<dc:creator>dipesh</dc:creator>
			<guid isPermaLink="false">8593@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;I am wondering, will this technique work with Composite Row Key as well?&#60;/p&#62;
&#60;p&#62;So the table (CF) would look like this:&#60;/p&#62;
&#60;p&#62;create column family TestTable&#60;br /&#62;
with key_validation_class = 'CompositeType (UTF8Type, UTF8Type)'&#60;br /&#62;
and comparator = 'UTF8Type'&#60;br /&#62;
;
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Anonymous on "Failure running Hive examples on DSE"</title>
			<link>http://www.datastax.com/support-forums/topic/failure-running-hive-examples-on-dse#post-2061</link>
			<pubDate>Fri, 08 Jun 2012 18:15:33 +0000</pubDate>
			<dc:creator>Anonymous</dc:creator>
			<guid isPermaLink="false">2061@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;When you start up all your nodes, use dsetool movejt to set the jobtracker at the specified datacenter / location. Probably the analytics node is not a seed, so it doesn't start up the jobtracker automatically.  It should remember the setting.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Anonymous on "Failure running Hive examples on DSE"</title>
			<link>http://www.datastax.com/support-forums/topic/failure-running-hive-examples-on-dse#post-2049</link>
			<pubDate>Wed, 06 Jun 2012 21:51:57 +0000</pubDate>
			<dc:creator>Anonymous</dc:creator>
			<guid isPermaLink="false">2049@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;We created a cluster across an ec2 availability zones within a region.  We are using EC2Snitch and we are having to bring up the nodes one at a time.  What would the proper procedure be fore bringing up a 3 cassandra node, one in each availability zone, then bringing up an analytical node, then possibly adding more nodes as needed.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Anonymous on "Failure running Hive examples on DSE"</title>
			<link>http://www.datastax.com/support-forums/topic/failure-running-hive-examples-on-dse#post-2047</link>
			<pubDate>Wed, 06 Jun 2012 18:05:08 +0000</pubDate>
			<dc:creator>Anonymous</dc:creator>
			<guid isPermaLink="false">2047@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;How can you tell there is no jobtracker?  If I run &#60;/p&#62;
&#60;p&#62;#dsetool jobtracker&#60;br /&#62;
10.10.21.85:8012&#60;/p&#62;
&#60;p&#62;I see there is a (TT) in the ring i was wondering if that should be a (JT).  If so how do you change that with service des start method.&#60;/p&#62;
&#60;p&#62;the contents of /etc/default/dse&#60;/p&#62;
&#60;p&#62;# enable this to start Hadoop's JobTracker and/or TaskTrackers on this machine.&#60;br /&#62;
# If left disabled, this will act as a regular Cassandra node.&#60;br /&#62;
HADOOP_ENABLED=1&#60;/p&#62;
&#60;p&#62;# enable this to set the replication factor for CFS.  Note that this will only&#60;br /&#62;
# have an effect the first time a cluster is started with HADOOP_ENABLED=1 and&#60;br /&#62;
# after that will be a no-op. Defaults to 1.&#60;br /&#62;
#CFS_REPLICATION_FACTOR=1&#60;/p&#62;
&#60;p&#62;# enable this to start Solr search indexing on this machine.  If left disabled,&#60;br /&#62;
# this will act as a regular Cassandra node.&#60;br /&#62;
SOLR_ENABLED=0&#60;br /&#62;
~
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Anonymous on "Failure running Hive examples on DSE"</title>
			<link>http://www.datastax.com/support-forums/topic/failure-running-hive-examples-on-dse#post-2046</link>
			<pubDate>Wed, 06 Jun 2012 16:25:45 +0000</pubDate>
			<dc:creator>Anonymous</dc:creator>
			<guid isPermaLink="false">2046@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;What happened to your jobtracker? From dsetool ring you don't seem to be running one.&#60;br /&#62;
Try starting the analytics node with -j option.
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Anonymous on "Failure running Hive examples on DSE"</title>
			<link>http://www.datastax.com/support-forums/topic/failure-running-hive-examples-on-dse#post-2045</link>
			<pubDate>Wed, 06 Jun 2012 13:49:37 +0000</pubDate>
			<dc:creator>Anonymous</dc:creator>
			<guid isPermaLink="false">2045@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;dsetool ring &#38;gt;&#38;gt;&#38;gt;&#60;/p&#62;
&#60;p&#62;Address         DC          Rack        Workload        Status State   Load            Owns    Token&#60;br /&#62;
                                                                                               113427455640312821154458202477256070485&#60;br /&#62;
10.10.21.85     us-east     1a          Analytics(tt)   Up     Normal  5.49 MB         33.33%  0&#60;br /&#62;
10.120.206.93   us-east     1b          Cassandra       Up     Normal  5.22 MB         33.33%  56713727820156410577229101238628035242&#60;br /&#62;
10.68.78.182    us-east     1d          Cassandra       Up     Normal  5.59 MB         33.33%  113427455640312821154458202477256070485     &#60;/p&#62;
&#60;p&#62;hive.log&#38;gt;&#38;gt;&#60;/p&#62;
&#60;p&#62;2012-06-06 01:56:14,558 ERROR hive.log (MetaStoreUtils.java:logAndThrowMetaException(780)) - Got exception: java.io.IOException UnavailableException()&#60;br /&#62;
2012-06-06 01:56:14,562 ERROR hive.log (MetaStoreUtils.java:logAndThrowMetaException(783)) - java.io.IOException: UnavailableException()&#60;br /&#62;
	at com.datastax.bdp.hadoop.cfs.CassandraFileSystemThriftStore.readSlice(CassandraFileSystemThriftStore.java:686)&#60;br /&#62;
	at com.datastax.bdp.hadoop.cfs.CassandraFileSystemThriftStore.readINodeColumns(CassandraFileSystemThriftStore.java:617)&#60;br /&#62;
	at com.datastax.bdp.hadoop.cfs.CassandraFileSystemThriftStore.retrieveINode(CassandraFileSystemThriftStore.java:569)&#60;br /&#62;
	at com.datastax.bdp.hadoop.cfs.CassandraFileSystemThriftStore.retrieveINode(CassandraFileSystemThriftStore.java:561)&#60;br /&#62;
	at com.datastax.bdp.hadoop.cfs.CassandraFileSystem.getFileStatus(CassandraFileSystem.java:508)&#60;br /&#62;
	at org.apache.hadoop.hive.metastore.Warehouse.isDir(Warehouse.java:377)&#60;br /&#62;
	at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.create_table_core(HiveMetaStore.java:1040)&#60;br /&#62;
	at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.access$700(HiveMetaStore.java:143)&#60;br /&#62;
	at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler$15.run(HiveMetaStore.java:1081)&#60;br /&#62;
	at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler$15.run(HiveMetaStore.java:1078)&#60;br /&#62;
	at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.executeWithRetry(HiveMetaStore.java:362)&#60;br /&#62;
	at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.create_table(HiveMetaStore.java:1078)&#60;br /&#62;
	at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.createTable(HiveMetaStoreClient.java:400)&#60;br /&#62;
	at org.apache.hadoop.hive.ql.metadata.Hive.createTable(Hive.java:540)&#60;br /&#62;
	at org.apache.hadoop.hive.ql.exec.DDLTask.createTable(DDLTask.java:3479)&#60;br /&#62;
	at org.apache.hadoop.hive.ql.exec.DDLTask.execute(DDLTask.java:225)&#60;br /&#62;
	at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:133)&#60;br /&#62;
	at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:57)&#60;br /&#62;
	at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:1332)&#60;br /&#62;
	at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1123)&#60;br /&#62;
	at org.apache.hadoop.hive.ql.Driver.run(Driver.java:931)&#60;br /&#62;
	at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:255)&#60;br /&#62;
	at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:212)&#60;br /&#62;
	at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:403)&#60;br /&#62;
	at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:671)&#60;br /&#62;
	at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:554)&#60;br /&#62;
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&#60;br /&#62;
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)&#60;br /&#62;
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)&#60;br /&#62;
	at java.lang.reflect.Method.invoke(Method.java:597)&#60;br /&#62;
	at org.apache.hadoop.util.RunJar.main(RunJar.java:156)&#60;br /&#62;
Caused by: UnavailableException()&#60;br /&#62;
	at org.apache.cassandra.thrift.Cassandra$get_slice_result.read(Cassandra.java:7764)&#60;br /&#62;
	at org.apache.cassandra.thrift.Cassandra$Client.recv_get_slice(Cassandra.java:570)&#60;br /&#62;
	at org.apache.cassandra.thrift.Cassandra$Client.get_slice(Cassandra.java:542)&#60;br /&#62;
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&#60;br /&#62;
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)&#60;br /&#62;
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)&#60;br /&#62;
	at java.lang.reflect.Method.invoke(Method.java:597)&#60;br /&#62;
	at com.datastax.bdp.util.CassandraProxyClient.invoke(CassandraProxyClient.java:407)&#60;br /&#62;
	at $Proxy5.get_slice(Unknown Source)&#60;br /&#62;
	at com.datastax.bdp.hadoop.cfs.CassandraFileSystemThriftStore.readSlice(CassandraFileSystemThriftStore.java:668)&#60;br /&#62;
	... 30 more&#60;/p&#62;
&#60;p&#62;2012-06-06 01:56:14,564 ERROR exec.Task (SessionState.java:printError(380)) - FAILED: Error in metadata: MetaException(message:Got exception: java.io.IOException UnavailableException())&#60;br /&#62;
org.apache.hadoop.hive.ql.metadata.HiveException: MetaException(message:Got exception: java.io.IOException UnavailableException())&#60;br /&#62;
	at org.apache.hadoop.hive.ql.metadata.Hive.createTable(Hive.java:546)&#60;br /&#62;
	at org.apache.hadoop.hive.ql.exec.DDLTask.createTable(DDLTask.java:3479)&#60;br /&#62;
	at org.apache.hadoop.hive.ql.exec.DDLTask.execute(DDLTask.java:225)&#60;br /&#62;
	at org.apache.hadoop.hive.ql.exec.Task.executeTask(Task.java:133)&#60;br /&#62;
	at org.apache.hadoop.hive.ql.exec.TaskRunner.runSequential(TaskRunner.java:57)&#60;br /&#62;
	at org.apache.hadoop.hive.ql.Driver.launchTask(Driver.java:1332)&#60;br /&#62;
	at org.apache.hadoop.hive.ql.Driver.execute(Driver.java:1123)&#60;br /&#62;
	at org.apache.hadoop.hive.ql.Driver.run(Driver.java:931)&#60;br /&#62;
	at org.apache.hadoop.hive.cli.CliDriver.processLocalCmd(CliDriver.java:255)&#60;br /&#62;
	at org.apache.hadoop.hive.cli.CliDriver.processCmd(CliDriver.java:212)&#60;br /&#62;
	at org.apache.hadoop.hive.cli.CliDriver.processLine(CliDriver.java:403)&#60;br /&#62;
	at org.apache.hadoop.hive.cli.CliDriver.run(CliDriver.java:671)&#60;br /&#62;
	at org.apache.hadoop.hive.cli.CliDriver.main(CliDriver.java:554)&#60;br /&#62;
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)&#60;br /&#62;
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)&#60;br /&#62;
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)&#60;br /&#62;
	at java.lang.reflect.Method.invoke(Method.java:597)&#60;br /&#62;
	at org.apache.hadoop.util.RunJar.main(RunJar.java:156)&#60;br /&#62;
Caused by: MetaException(message:Got exception: java.io.IOException UnavailableException())&#60;br /&#62;
	at org.apache.hadoop.hive.metastore.MetaStoreUtils.logAndThrowMetaException(MetaStoreUtils.java:784)&#60;br /&#62;
	at org.apache.hadoop.hive.metastore.Warehouse.isDir(Warehouse.java:385)&#60;br /&#62;
	at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.create_table_core(HiveMetaStore.java:1040)&#60;br /&#62;
	at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.access$700(HiveMetaStore.java:143)&#60;br /&#62;
	at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler$15.run(HiveMetaStore.java:1081)&#60;br /&#62;
	at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler$15.run(HiveMetaStore.java:1078)&#60;br /&#62;
	at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.executeWithRetry(HiveMetaStore.java:362)&#60;br /&#62;
	at org.apache.hadoop.hive.metastore.HiveMetaStore$HMSHandler.create_table(HiveMetaStore.java:1078)&#60;br /&#62;
	at org.apache.hadoop.hive.metastore.HiveMetaStoreClient.createTable(HiveMetaStoreClient.java:400)&#60;br /&#62;
	at org.apache.hadoop.hive.ql.metadata.Hive.createTable(Hive.java:540)&#60;br /&#62;
	... 17 more&#60;/p&#62;
&#60;p&#62;2012-06-06 01:56:14,565 ERROR ql.Driver (SessionState.java:printError(380)) - FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Anonymous on "Failure running Hive examples on DSE"</title>
			<link>http://www.datastax.com/support-forums/topic/failure-running-hive-examples-on-dse#post-2043</link>
			<pubDate>Wed, 06 Jun 2012 09:42:26 +0000</pubDate>
			<dc:creator>Anonymous</dc:creator>
			<guid isPermaLink="false">2043@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;What is your cluster configuration (dsetool ring)?&#60;br /&#62;
Can you post a full exception stacktrace from hive logs?
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Anonymous on "Failure running Hive examples on DSE"</title>
			<link>http://www.datastax.com/support-forums/topic/failure-running-hive-examples-on-dse#post-2042</link>
			<pubDate>Wed, 06 Jun 2012 02:00:52 +0000</pubDate>
			<dc:creator>Anonymous</dc:creator>
			<guid isPermaLink="false">2042@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;It seems to be similar to this problem&#60;br /&#62;
&#60;a href=&#34;http://www.datastax.com/support-forums/topic/there-was-a-problem-with-the-cassandra-hive-metastore&#34; rel=&#34;nofollow&#34;&#62;http://www.datastax.com/support-forums/topic/there-was-a-problem-with-the-cassandra-hive-metastore&#60;/a&#62;&#60;/p&#62;
&#60;p&#62;But the error is slightly different.  &#60;/p&#62;
&#60;p&#62;hive&#38;gt; CREATE TABLE invites (foo INT, bar STRING)&#60;br /&#62;
    &#38;gt; PARTITIONED BY (ds STRING);&#60;br /&#62;
FAILED: Error in metadata: MetaException(message:Got exception: java.io.IOException UnavailableException())&#60;br /&#62;
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask&#60;/p&#62;
&#60;p&#62;We are trying to run the lastest DSE up on amazon ec2.   Any thoughts on our configuration error?&#60;/p&#62;
&#60;p&#62;Thanks,&#60;/p&#62;
&#60;p&#62;Todd
&#60;/p&#62;</description>
		</item>
		<item>
			<title>Anonymous on "Cassandra Hive Storage Handler Sample for Map data type"</title>
			<link>http://www.datastax.com/support-forums/topic/cassandra-hive-storage-handler-sample-for-map-data-type#post-1957</link>
			<pubDate>Tue, 22 May 2012 07:23:19 +0000</pubDate>
			<dc:creator>Anonymous</dc:creator>
			<guid isPermaLink="false">1957@http://www.datastax.com/support-forums/</guid>
			<description>&#60;p&#62;My use case is to have a Hive table definition with MAP Hive data type so that it can support varying set of key value properties per each row which is allowed in Cassandra. Some thing like what's given below.&#60;/p&#62;
&#60;p&#62;CREATE EXTERNAL TABLE mapExample (foo INT, bar STRING, properties MAP&#38;lt;STRING,STRING&#38;gt;) STORED BY 'org.apache.hadoop.hive.cassandra.CassandraStorageHandler'&#60;br /&#62;
WITH SERDEPROPERTIES (&#34;cassandra.host&#34; = &#34;127.0.0.1&#34;,&#34;cassandra.port&#34; = &#34;9160&#34;,&#34;cassandra.ks.name&#34; = &#34;examples&#34;,&#34;cassandra.cf.name&#34; = &#34;map&#34; );&#60;/p&#62;
&#60;p&#62;But I am not sure how to provide the cassandra.column.mappings etc. since there is little documentation on how to use map data type with Hive, specially with Cassandra Storage handler. Any pointers regarding this are greatly appreciated.&#60;/p&#62;
&#60;p&#62;Regards&#60;br /&#62;
Buddhika
&#60;/p&#62;</description>
		</item>

	</channel>
</rss>
