You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Liyin Tang (JIRA)" <ji...@apache.org> on 2010/10/27 03:28:21 UTC
[jira] Created: (HIVE-1754) Remove JDBM component from Map Join
Remove JDBM component from Map Join
-----------------------------------
Key: HIVE-1754
URL: https://issues.apache.org/jira/browse/HIVE-1754
Project: Hive
Issue Type: Improvement
Components: Query Processor
Affects Versions: 0.6.0, 0.7.0
Reporter: Liyin Tang
Assignee: Liyin Tang
Fix For: 0.7.0
Right now, JDBM is the major performance bottleneck of performance.
With the growth of the small table, the PUT and GET operation will take most of execution time.
Map Join is designed to load the data of small table into memory.
If the data is too large to hold in memory, then there is no need to use the map join strategy.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HIVE-1754) Remove JDBM component from Map Join
Posted by "Liyin Tang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HIVE-1754?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Liyin Tang updated HIVE-1754:
-----------------------------
Attachment: hive-1754_9.patch
> Remove JDBM component from Map Join
> -----------------------------------
>
> Key: HIVE-1754
> URL: https://issues.apache.org/jira/browse/HIVE-1754
> Project: Hive
> Issue Type: Improvement
> Components: Query Processor
> Affects Versions: 0.6.0, 0.7.0
> Reporter: Liyin Tang
> Assignee: Liyin Tang
> Fix For: 0.7.0
>
> Attachments: Hive-1754.patch, Hive-1754_2.patch, Hive-1754_3.patch, hive-1754_4.patch, hive-1754_5.patch, hive-1754_7.patch, hive-1754_9.patch
>
>
> Right now, JDBM is the major performance bottleneck of performance.
> With the growth of the small table, the PUT and GET operation will take most of execution time.
> Map Join is designed to load the data of small table into memory.
> If the data is too large to hold in memory, then there is no need to use the map join strategy.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HIVE-1754) Remove JDBM component from Map Join
Posted by "Liyin Tang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HIVE-1754?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Liyin Tang updated HIVE-1754:
-----------------------------
Status: Patch Available (was: Open)
This patch modifies the following things
1) Remove the JDBM from Hive
2) All the data in the small table will be stored in in-memory hashtable.
3) Create a light-weight RowContainer: MapJoinRowContainer.
4) Optimize MapJoinObjectKey. If there are only one join key or two join keys, it will use MapJoinSingleKey or MapJoinDoulbeKeys instead of MapJoinObjectKey.
> Remove JDBM component from Map Join
> -----------------------------------
>
> Key: HIVE-1754
> URL: https://issues.apache.org/jira/browse/HIVE-1754
> Project: Hive
> Issue Type: Improvement
> Components: Query Processor
> Affects Versions: 0.6.0, 0.7.0
> Reporter: Liyin Tang
> Assignee: Liyin Tang
> Fix For: 0.7.0
>
> Attachments: Hive-1754.patch
>
>
> Right now, JDBM is the major performance bottleneck of performance.
> With the growth of the small table, the PUT and GET operation will take most of execution time.
> Map Join is designed to load the data of small table into memory.
> If the data is too large to hold in memory, then there is no need to use the map join strategy.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HIVE-1754) Remove JDBM component from Map Join
Posted by "Liyin Tang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HIVE-1754?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Liyin Tang updated HIVE-1754:
-----------------------------
Attachment: hive-1754_4.patch
Resolved all the output conflicts in this patch
> Remove JDBM component from Map Join
> -----------------------------------
>
> Key: HIVE-1754
> URL: https://issues.apache.org/jira/browse/HIVE-1754
> Project: Hive
> Issue Type: Improvement
> Components: Query Processor
> Affects Versions: 0.6.0, 0.7.0
> Reporter: Liyin Tang
> Assignee: Liyin Tang
> Fix For: 0.7.0
>
> Attachments: Hive-1754.patch, Hive-1754_2.patch, Hive-1754_3.patch, hive-1754_4.patch
>
>
> Right now, JDBM is the major performance bottleneck of performance.
> With the growth of the small table, the PUT and GET operation will take most of execution time.
> Map Join is designed to load the data of small table into memory.
> If the data is too large to hold in memory, then there is no need to use the map join strategy.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HIVE-1754) Remove JDBM component from Map Join
Posted by "He Yongqiang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HIVE-1754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12930405#action_12930405 ]
He Yongqiang commented on HIVE-1754:
------------------------------------
1. code style:
A new file always needs a Apache license header.
And for example:
{noformat}
public class PathUtil {
public static String suffix=".hashtable";
public static String generatePath(String baseURI,Byte tag,String bigBucketFileName){
String path = new String(baseURI+Path.SEPARATOR+"-"+tag+"-"+bigBucketFileName+suffix);
return path;
}
public static String generateFileName(Byte tag,String bigBucketFileName){
String fileName = new String("-"+tag+"-"+bigBucketFileName+suffix);
return fileName;
}
public static String generateTmpURI(String baseURI,String id){
String tmpFileURI = new String(baseURI+Path.SEPARATOR+"HashTable-"+id);
return tmpFileURI;
}
}
{noformat}
Should be formated to :
{noformat}
/**
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.hadoop.hive.ql.util;
import org.apache.hadoop.fs.Path;
public class PathUtil {
public static String suffix = ".hashtable";
public static String generatePath(String baseURI, Byte tag,
String bigBucketFileName) {
String path = new String(baseURI + Path.SEPARATOR + "-" + tag + "-"
+ bigBucketFileName + suffix);
return path;
}
public static String generateFileName(Byte tag, String bigBucketFileName) {
String fileName = new String("-" + tag + "-" + bigBucketFileName + suffix);
return fileName;
}
public static String generateTmpURI(String baseURI, String id) {
String tmpFileURI = new String(baseURI + Path.SEPARATOR + "HashTable-" + id);
return tmpFileURI;
}
}
{noformat}
2.
Let's put PathUtil.java and TimeUtil.java into a HiveUtil class, like Utilities in exec (or create a new one and put in exec package or common package).
3.
In ExecDriver.java
- //Qualify the path against the filesystem. The user configured path might contain default port which is skipped
- //in the file status. This makes sure that all paths which goes into PathToPartitionInfo are always listed status
- //filepath.
- newPath = fs.makeQualified(newPath);
why these code are removed? They should be there.
4.
revert the changes in ExecMapper. keep it clean.
5.
code style in HashTableDummyOperator. add a default serialize id. do not use 2 blank lines inside a method. keep at least one blank line between 2 method definitons.
6.
remove some never read vars from HashTableSinkOperator.
{noformat}
protected transient
Map<Byte, List<ObjectInspector>> rowContainerStandardObjectInspectors;
{noformat}
should be in one line.
generateMapMetaData(); can be put into init(). MapJoinRowContainer res = null; should be parameterized.
int bucketSize = HiveConf.getIntVar(hconf, HiveConf.ConfVars.HIVEMAPJOINBUCKETCACHESIZE); should be put into init().
bucketSize can be a class field.
res.add(value); is duplicate in if () {} else {}. Put it after the if else.
In close(), if the abort is true, do we need to do the dump?
{noformat}
String bigBucketFileName = this.getExecContext().getCurrentBigBucketFile();
if(bigBucketFileName == null ||bigBucketFileName.length()==0) {
bigBucketFileName="-";
}
{noformat}
I guess if we run it locally, the bigBucketFileName is always null. Is that true. If yes, how does this patch handle the bucket map join?
7.
revert changes of MapRedTask
8.
AbstractRowContainer/MapJoinDoubleKeys/MapJoinRowContainer/MapJoinSingleKey misses the apache header.
Please make sure cleaning up the code.
> Remove JDBM component from Map Join
> -----------------------------------
>
> Key: HIVE-1754
> URL: https://issues.apache.org/jira/browse/HIVE-1754
> Project: Hive
> Issue Type: Improvement
> Components: Query Processor
> Affects Versions: 0.6.0, 0.7.0
> Reporter: Liyin Tang
> Assignee: Liyin Tang
> Fix For: 0.7.0
>
> Attachments: Hive-1754.patch, Hive-1754_2.patch, Hive-1754_3.patch, hive-1754_4.patch, hive-1754_5.patch
>
>
> Right now, JDBM is the major performance bottleneck of performance.
> With the growth of the small table, the PUT and GET operation will take most of execution time.
> Map Join is designed to load the data of small table into memory.
> If the data is too large to hold in memory, then there is no need to use the map join strategy.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HIVE-1754) Remove JDBM component from Map Join
Posted by "Liyin Tang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HIVE-1754?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Liyin Tang updated HIVE-1754:
-----------------------------
Attachment: Hive-1754_3.patch
Fix a bug when join value is null
Also fix the hive-1775
> Remove JDBM component from Map Join
> -----------------------------------
>
> Key: HIVE-1754
> URL: https://issues.apache.org/jira/browse/HIVE-1754
> Project: Hive
> Issue Type: Improvement
> Components: Query Processor
> Affects Versions: 0.6.0, 0.7.0
> Reporter: Liyin Tang
> Assignee: Liyin Tang
> Fix For: 0.7.0
>
> Attachments: Hive-1754.patch, Hive-1754_2.patch, Hive-1754_3.patch
>
>
> Right now, JDBM is the major performance bottleneck of performance.
> With the growth of the small table, the PUT and GET operation will take most of execution time.
> Map Join is designed to load the data of small table into memory.
> If the data is too large to hold in memory, then there is no need to use the map join strategy.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HIVE-1754) Remove JDBM component from Map Join
Posted by "Liyin Tang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HIVE-1754?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Liyin Tang updated HIVE-1754:
-----------------------------
Attachment: Hive-1754_2.patch
Remove JDBM from Hive completely
> Remove JDBM component from Map Join
> -----------------------------------
>
> Key: HIVE-1754
> URL: https://issues.apache.org/jira/browse/HIVE-1754
> Project: Hive
> Issue Type: Improvement
> Components: Query Processor
> Affects Versions: 0.6.0, 0.7.0
> Reporter: Liyin Tang
> Assignee: Liyin Tang
> Fix For: 0.7.0
>
> Attachments: Hive-1754.patch, Hive-1754_2.patch
>
>
> Right now, JDBM is the major performance bottleneck of performance.
> With the growth of the small table, the PUT and GET operation will take most of execution time.
> Map Join is designed to load the data of small table into memory.
> If the data is too large to hold in memory, then there is no need to use the map join strategy.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (HIVE-1754) Remove JDBM component from Map Join
Posted by "He Yongqiang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HIVE-1754?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
He Yongqiang resolved HIVE-1754.
--------------------------------
Resolution: Fixed
Committed! Thanks Liyin!
> Remove JDBM component from Map Join
> -----------------------------------
>
> Key: HIVE-1754
> URL: https://issues.apache.org/jira/browse/HIVE-1754
> Project: Hive
> Issue Type: Improvement
> Components: Query Processor
> Affects Versions: 0.6.0, 0.7.0
> Reporter: Liyin Tang
> Assignee: Liyin Tang
> Fix For: 0.7.0
>
> Attachments: Hive-1754.patch, Hive-1754_2.patch, Hive-1754_3.patch, hive-1754_4.patch, hive-1754_5.patch, hive-1754_7.patch, hive-1754_9.patch
>
>
> Right now, JDBM is the major performance bottleneck of performance.
> With the growth of the small table, the PUT and GET operation will take most of execution time.
> Map Join is designed to load the data of small table into memory.
> If the data is too large to hold in memory, then there is no need to use the map join strategy.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HIVE-1754) Remove JDBM component from Map Join
Posted by "Liyin Tang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HIVE-1754?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Liyin Tang updated HIVE-1754:
-----------------------------
Attachment: hive-1754_7.patch
Change the code style according to the reviewer comments
> Remove JDBM component from Map Join
> -----------------------------------
>
> Key: HIVE-1754
> URL: https://issues.apache.org/jira/browse/HIVE-1754
> Project: Hive
> Issue Type: Improvement
> Components: Query Processor
> Affects Versions: 0.6.0, 0.7.0
> Reporter: Liyin Tang
> Assignee: Liyin Tang
> Fix For: 0.7.0
>
> Attachments: Hive-1754.patch, Hive-1754_2.patch, Hive-1754_3.patch, hive-1754_4.patch, hive-1754_5.patch, hive-1754_7.patch
>
>
> Right now, JDBM is the major performance bottleneck of performance.
> With the growth of the small table, the PUT and GET operation will take most of execution time.
> Map Join is designed to load the data of small table into memory.
> If the data is too large to hold in memory, then there is no need to use the map join strategy.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HIVE-1754) Remove JDBM component from Map Join
Posted by "Liyin Tang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HIVE-1754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12928262#action_12928262 ]
Liyin Tang commented on HIVE-1754:
----------------------------------
This patch has some potential bugs. I will fix it today and upload a new one.
> Remove JDBM component from Map Join
> -----------------------------------
>
> Key: HIVE-1754
> URL: https://issues.apache.org/jira/browse/HIVE-1754
> Project: Hive
> Issue Type: Improvement
> Components: Query Processor
> Affects Versions: 0.6.0, 0.7.0
> Reporter: Liyin Tang
> Assignee: Liyin Tang
> Fix For: 0.7.0
>
> Attachments: Hive-1754.patch
>
>
> Right now, JDBM is the major performance bottleneck of performance.
> With the growth of the small table, the PUT and GET operation will take most of execution time.
> Map Join is designed to load the data of small table into memory.
> If the data is too large to hold in memory, then there is no need to use the map join strategy.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HIVE-1754) Remove JDBM component from Map Join
Posted by "He Yongqiang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HIVE-1754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12931284#action_12931284 ]
He Yongqiang commented on HIVE-1754:
------------------------------------
can you upload a new patch? The diff is not correct.
--------------------------
|Index: src/test/results/clientpositive/join29.q.out
|===================================================================
|--- src/test/results/clientpositive/join29.q.out (revision 1032800)
|+++ src/test/results/clientpositive/join29.q.out (working copy)
I will try to get this in today.
> Remove JDBM component from Map Join
> -----------------------------------
>
> Key: HIVE-1754
> URL: https://issues.apache.org/jira/browse/HIVE-1754
> Project: Hive
> Issue Type: Improvement
> Components: Query Processor
> Affects Versions: 0.6.0, 0.7.0
> Reporter: Liyin Tang
> Assignee: Liyin Tang
> Fix For: 0.7.0
>
> Attachments: Hive-1754.patch, Hive-1754_2.patch, Hive-1754_3.patch, hive-1754_4.patch, hive-1754_5.patch, hive-1754_7.patch
>
>
> Right now, JDBM is the major performance bottleneck of performance.
> With the growth of the small table, the PUT and GET operation will take most of execution time.
> Map Join is designed to load the data of small table into memory.
> If the data is too large to hold in memory, then there is no need to use the map join strategy.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HIVE-1754) Remove JDBM component from Map Join
Posted by "Liyin Tang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HIVE-1754?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Liyin Tang updated HIVE-1754:
-----------------------------
Attachment: Hive-1754.patch
> Remove JDBM component from Map Join
> -----------------------------------
>
> Key: HIVE-1754
> URL: https://issues.apache.org/jira/browse/HIVE-1754
> Project: Hive
> Issue Type: Improvement
> Components: Query Processor
> Affects Versions: 0.6.0, 0.7.0
> Reporter: Liyin Tang
> Assignee: Liyin Tang
> Fix For: 0.7.0
>
> Attachments: Hive-1754.patch
>
>
> Right now, JDBM is the major performance bottleneck of performance.
> With the growth of the small table, the PUT and GET operation will take most of execution time.
> Map Join is designed to load the data of small table into memory.
> If the data is too large to hold in memory, then there is no need to use the map join strategy.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HIVE-1754) Remove JDBM component from Map Join
Posted by "He Yongqiang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HIVE-1754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12931318#action_12931318 ]
He Yongqiang commented on HIVE-1754:
------------------------------------
running tests.
> Remove JDBM component from Map Join
> -----------------------------------
>
> Key: HIVE-1754
> URL: https://issues.apache.org/jira/browse/HIVE-1754
> Project: Hive
> Issue Type: Improvement
> Components: Query Processor
> Affects Versions: 0.6.0, 0.7.0
> Reporter: Liyin Tang
> Assignee: Liyin Tang
> Fix For: 0.7.0
>
> Attachments: Hive-1754.patch, Hive-1754_2.patch, Hive-1754_3.patch, hive-1754_4.patch, hive-1754_5.patch, hive-1754_7.patch, hive-1754_9.patch
>
>
> Right now, JDBM is the major performance bottleneck of performance.
> With the growth of the small table, the PUT and GET operation will take most of execution time.
> Map Join is designed to load the data of small table into memory.
> If the data is too large to hold in memory, then there is no need to use the map join strategy.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HIVE-1754) Remove JDBM component from Map Join
Posted by "Namit Jain (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HIVE-1754?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Namit Jain updated HIVE-1754:
-----------------------------
Status: Open (was: Patch Available)
> Remove JDBM component from Map Join
> -----------------------------------
>
> Key: HIVE-1754
> URL: https://issues.apache.org/jira/browse/HIVE-1754
> Project: Hive
> Issue Type: Improvement
> Components: Query Processor
> Affects Versions: 0.6.0, 0.7.0
> Reporter: Liyin Tang
> Assignee: Liyin Tang
> Fix For: 0.7.0
>
> Attachments: Hive-1754.patch
>
>
> Right now, JDBM is the major performance bottleneck of performance.
> With the growth of the small table, the PUT and GET operation will take most of execution time.
> Map Join is designed to load the data of small table into memory.
> If the data is too large to hold in memory, then there is no need to use the map join strategy.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (HIVE-1754) Remove JDBM component from Map Join
Posted by "Liyin Tang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HIVE-1754?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Liyin Tang updated HIVE-1754:
-----------------------------
Attachment: hive-1754_5.patch
This patch clears the conflicts of test output file completely.
> Remove JDBM component from Map Join
> -----------------------------------
>
> Key: HIVE-1754
> URL: https://issues.apache.org/jira/browse/HIVE-1754
> Project: Hive
> Issue Type: Improvement
> Components: Query Processor
> Affects Versions: 0.6.0, 0.7.0
> Reporter: Liyin Tang
> Assignee: Liyin Tang
> Fix For: 0.7.0
>
> Attachments: Hive-1754.patch, Hive-1754_2.patch, Hive-1754_3.patch, hive-1754_4.patch, hive-1754_5.patch
>
>
> Right now, JDBM is the major performance bottleneck of performance.
> With the growth of the small table, the PUT and GET operation will take most of execution time.
> Map Join is designed to load the data of small table into memory.
> If the data is too large to hold in memory, then there is no need to use the map join strategy.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (HIVE-1754) Remove JDBM component from Map Join
Posted by "He Yongqiang (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/HIVE-1754?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12930291#action_12930291 ]
He Yongqiang commented on HIVE-1754:
------------------------------------
will take a close look.
> Remove JDBM component from Map Join
> -----------------------------------
>
> Key: HIVE-1754
> URL: https://issues.apache.org/jira/browse/HIVE-1754
> Project: Hive
> Issue Type: Improvement
> Components: Query Processor
> Affects Versions: 0.6.0, 0.7.0
> Reporter: Liyin Tang
> Assignee: Liyin Tang
> Fix For: 0.7.0
>
> Attachments: Hive-1754.patch, Hive-1754_2.patch, Hive-1754_3.patch, hive-1754_4.patch, hive-1754_5.patch
>
>
> Right now, JDBM is the major performance bottleneck of performance.
> With the growth of the small table, the PUT and GET operation will take most of execution time.
> Map Join is designed to load the data of small table into memory.
> If the data is too large to hold in memory, then there is no need to use the map join strategy.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.