blob: 60fc7ef3d9ee83786b017745f7c3832d47d3607e [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (1.8.0_121) on Fri Apr 14 22:11:35 PDT 2017 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>MySQLJDBCIDMigrator (Mahout Map-Reduce 0.13.0 API)</title>
<meta name="date" content="2017-04-14">
<link rel="stylesheet" type="text/css" href="../../../../../../../stylesheet.css" title="Style">
<script type="text/javascript" src="../../../../../../../script.js"></script>
</head>
<body>
<script type="text/javascript"><!--
try {
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="MySQLJDBCIDMigrator (Mahout Map-Reduce 0.13.0 API)";
}
}
catch(err) {
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/MySQLJDBCIDMigrator.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../../../org/apache/mahout/cf/taste/impl/model/MemoryIDMigrator.html" title="class in org.apache.mahout.cf.taste.impl.model"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../../../org/apache/mahout/cf/taste/impl/model/PlusAnonymousConcurrentUserDataModel.html" title="class in org.apache.mahout.cf.taste.impl.model"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../../index.html?org/apache/mahout/cf/taste/impl/model/MySQLJDBCIDMigrator.html" target="_top">Frames</a></li>
<li><a href="MySQLJDBCIDMigrator.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#fields.inherited.from.class.org.apache.mahout.cf.taste.impl.model.AbstractJDBCIDMigrator">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#methods.inherited.from.class.org.apache.mahout.cf.taste.impl.model.AbstractJDBCIDMigrator">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li>Method</li>
</ul>
</div>
<a name="skip.navbar.top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<!-- ======== START OF CLASS DATA ======== -->
<div class="header">
<div class="subTitle">org.apache.mahout.cf.taste.impl.model</div>
<h2 title="Class MySQLJDBCIDMigrator" class="title">Class MySQLJDBCIDMigrator</h2>
</div>
<div class="contentContainer">
<ul class="inheritance">
<li><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</a></li>
<li>
<ul class="inheritance">
<li><a href="../../../../../../../org/apache/mahout/cf/taste/impl/model/AbstractIDMigrator.html" title="class in org.apache.mahout.cf.taste.impl.model">org.apache.mahout.cf.taste.impl.model.AbstractIDMigrator</a></li>
<li>
<ul class="inheritance">
<li><a href="../../../../../../../org/apache/mahout/cf/taste/impl/model/AbstractJDBCIDMigrator.html" title="class in org.apache.mahout.cf.taste.impl.model">org.apache.mahout.cf.taste.impl.model.AbstractJDBCIDMigrator</a></li>
<li>
<ul class="inheritance">
<li>org.apache.mahout.cf.taste.impl.model.MySQLJDBCIDMigrator</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
<div class="description">
<ul class="blockList">
<li class="blockList">
<dl>
<dt>All Implemented Interfaces:</dt>
<dd><a href="../../../../../../../org/apache/mahout/cf/taste/common/Refreshable.html" title="interface in org.apache.mahout.cf.taste.common">Refreshable</a>, <a href="../../../../../../../org/apache/mahout/cf/taste/model/IDMigrator.html" title="interface in org.apache.mahout.cf.taste.model">IDMigrator</a>, <a href="../../../../../../../org/apache/mahout/cf/taste/model/UpdatableIDMigrator.html" title="interface in org.apache.mahout.cf.taste.model">UpdatableIDMigrator</a></dd>
</dl>
<hr>
<br>
<pre>public final class <span class="typeNameLabel">MySQLJDBCIDMigrator</span>
extends <a href="../../../../../../../org/apache/mahout/cf/taste/impl/model/AbstractJDBCIDMigrator.html" title="class in org.apache.mahout.cf.taste.impl.model">AbstractJDBCIDMigrator</a></pre>
<div class="block"><p>
An implementation for MySQL. The following statement would create a table suitable for use with this class:
</p>
<p>
<pre>
CREATE TABLE taste_id_migration (
long_id BIGINT NOT NULL PRIMARY KEY,
string_id VARCHAR(255) NOT NULL UNIQUE
)
</pre>
</p>
<p>
Separately, note that in a MySQL database, the following function calls will convert a string value into a
numeric value in the same way that the standard implementations in this package do. This may be useful in
writing SQL statements for use with
<code>AbstractJDBCDataModel</code> subclasses which convert string
column values to appropriate numeric values -- though this should be viewed as a temporary arrangement
since it will impact performance:
</p>
<p>
<code>cast(conv(substring(md5([column name]), 1, 16),16,10) as signed)</code>
</p></div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- =========== FIELD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="field.summary">
<!-- -->
</a>
<h3>Field Summary</h3>
<ul class="blockList">
<li class="blockList"><a name="fields.inherited.from.class.org.apache.mahout.cf.taste.impl.model.AbstractJDBCIDMigrator">
<!-- -->
</a>
<h3>Fields inherited from class&nbsp;org.apache.mahout.cf.taste.impl.model.<a href="../../../../../../../org/apache/mahout/cf/taste/impl/model/AbstractJDBCIDMigrator.html" title="class in org.apache.mahout.cf.taste.impl.model">AbstractJDBCIDMigrator</a></h3>
<code><a href="../../../../../../../org/apache/mahout/cf/taste/impl/model/AbstractJDBCIDMigrator.html#DEFAULT_LONG_ID_COLUMN">DEFAULT_LONG_ID_COLUMN</a>, <a href="../../../../../../../org/apache/mahout/cf/taste/impl/model/AbstractJDBCIDMigrator.html#DEFAULT_MAPPING_TABLE">DEFAULT_MAPPING_TABLE</a>, <a href="../../../../../../../org/apache/mahout/cf/taste/impl/model/AbstractJDBCIDMigrator.html#DEFAULT_STRING_ID_COLUMN">DEFAULT_STRING_ID_COLUMN</a></code></li>
</ul>
</li>
</ul>
<!-- ======== CONSTRUCTOR SUMMARY ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.summary">
<!-- -->
</a>
<h3>Constructor Summary</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Constructor Summary table, listing constructors, and an explanation">
<caption><span>Constructors</span><span class="tabEnd">&nbsp;</span></caption>
<tr>
<th class="colOne" scope="col">Constructor and Description</th>
</tr>
<tr class="altColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/mahout/cf/taste/impl/model/MySQLJDBCIDMigrator.html#MySQLJDBCIDMigrator-javax.sql.DataSource-">MySQLJDBCIDMigrator</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/javax/sql/DataSource.html?is-external=true" title="class or interface in javax.sql">DataSource</a>&nbsp;dataSource)</code>&nbsp;</td>
</tr>
<tr class="rowColor">
<td class="colOne"><code><span class="memberNameLink"><a href="../../../../../../../org/apache/mahout/cf/taste/impl/model/MySQLJDBCIDMigrator.html#MySQLJDBCIDMigrator-javax.sql.DataSource-java.lang.String-java.lang.String-java.lang.String-">MySQLJDBCIDMigrator</a></span>(<a href="http://docs.oracle.com/javase/7/docs/api/javax/sql/DataSource.html?is-external=true" title="class or interface in javax.sql">DataSource</a>&nbsp;dataSource,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;mappingTable,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;longIDColumn,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;stringIDColumn)</code>&nbsp;</td>
</tr>
</table>
</li>
</ul>
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>Method Summary</h3>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.org.apache.mahout.cf.taste.impl.model.AbstractJDBCIDMigrator">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.mahout.cf.taste.impl.model.<a href="../../../../../../../org/apache/mahout/cf/taste/impl/model/AbstractJDBCIDMigrator.html" title="class in org.apache.mahout.cf.taste.impl.model">AbstractJDBCIDMigrator</a></h3>
<code><a href="../../../../../../../org/apache/mahout/cf/taste/impl/model/AbstractJDBCIDMigrator.html#initialize-java.lang.Iterable-">initialize</a>, <a href="../../../../../../../org/apache/mahout/cf/taste/impl/model/AbstractJDBCIDMigrator.html#storeMapping-long-java.lang.String-">storeMapping</a>, <a href="../../../../../../../org/apache/mahout/cf/taste/impl/model/AbstractJDBCIDMigrator.html#toStringID-long-">toStringID</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.org.apache.mahout.cf.taste.impl.model.AbstractIDMigrator">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;org.apache.mahout.cf.taste.impl.model.<a href="../../../../../../../org/apache/mahout/cf/taste/impl/model/AbstractIDMigrator.html" title="class in org.apache.mahout.cf.taste.impl.model">AbstractIDMigrator</a></h3>
<code><a href="../../../../../../../org/apache/mahout/cf/taste/impl/model/AbstractIDMigrator.html#hash-java.lang.String-">hash</a>, <a href="../../../../../../../org/apache/mahout/cf/taste/impl/model/AbstractIDMigrator.html#refresh-java.util.Collection-">refresh</a>, <a href="../../../../../../../org/apache/mahout/cf/taste/impl/model/AbstractIDMigrator.html#toLongID-java.lang.String-">toLongID</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.java.lang.Object">
<!-- -->
</a>
<h3>Methods inherited from class&nbsp;java.lang.<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</a></h3>
<code><a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#clone--" title="class or interface in java.lang">clone</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#equals-java.lang.Object-" title="class or interface in java.lang">equals</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#finalize--" title="class or interface in java.lang">finalize</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#getClass--" title="class or interface in java.lang">getClass</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#hashCode--" title="class or interface in java.lang">hashCode</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notify--" title="class or interface in java.lang">notify</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#notifyAll--" title="class or interface in java.lang">notifyAll</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#toString--" title="class or interface in java.lang">toString</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait--" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-" title="class or interface in java.lang">wait</a>, <a href="http://docs.oracle.com/javase/7/docs/api/java/lang/Object.html?is-external=true#wait-long-int-" title="class or interface in java.lang">wait</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.org.apache.mahout.cf.taste.model.IDMigrator">
<!-- -->
</a>
<h3>Methods inherited from interface&nbsp;org.apache.mahout.cf.taste.model.<a href="../../../../../../../org/apache/mahout/cf/taste/model/IDMigrator.html" title="interface in org.apache.mahout.cf.taste.model">IDMigrator</a></h3>
<code><a href="../../../../../../../org/apache/mahout/cf/taste/model/IDMigrator.html#toLongID-java.lang.String-">toLongID</a></code></li>
</ul>
<ul class="blockList">
<li class="blockList"><a name="methods.inherited.from.class.org.apache.mahout.cf.taste.common.Refreshable">
<!-- -->
</a>
<h3>Methods inherited from interface&nbsp;org.apache.mahout.cf.taste.common.<a href="../../../../../../../org/apache/mahout/cf/taste/common/Refreshable.html" title="interface in org.apache.mahout.cf.taste.common">Refreshable</a></h3>
<code><a href="../../../../../../../org/apache/mahout/cf/taste/common/Refreshable.html#refresh-java.util.Collection-">refresh</a></code></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ========= CONSTRUCTOR DETAIL ======== -->
<ul class="blockList">
<li class="blockList"><a name="constructor.detail">
<!-- -->
</a>
<h3>Constructor Detail</h3>
<a name="MySQLJDBCIDMigrator-javax.sql.DataSource-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>MySQLJDBCIDMigrator</h4>
<pre>public&nbsp;MySQLJDBCIDMigrator(<a href="http://docs.oracle.com/javase/7/docs/api/javax/sql/DataSource.html?is-external=true" title="class or interface in javax.sql">DataSource</a>&nbsp;dataSource)</pre>
</li>
</ul>
<a name="MySQLJDBCIDMigrator-javax.sql.DataSource-java.lang.String-java.lang.String-java.lang.String-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>MySQLJDBCIDMigrator</h4>
<pre>public&nbsp;MySQLJDBCIDMigrator(<a href="http://docs.oracle.com/javase/7/docs/api/javax/sql/DataSource.html?is-external=true" title="class or interface in javax.sql">DataSource</a>&nbsp;dataSource,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;mappingTable,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;longIDColumn,
<a href="http://docs.oracle.com/javase/7/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;stringIDColumn)</pre>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
<!-- ========= END OF CLASS DATA ========= -->
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar.bottom">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="../../../../../../../overview-summary.html">Overview</a></li>
<li><a href="package-summary.html">Package</a></li>
<li class="navBarCell1Rev">Class</li>
<li><a href="class-use/MySQLJDBCIDMigrator.html">Use</a></li>
<li><a href="package-tree.html">Tree</a></li>
<li><a href="../../../../../../../deprecated-list.html">Deprecated</a></li>
<li><a href="../../../../../../../index-all.html">Index</a></li>
<li><a href="../../../../../../../help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../../../../../org/apache/mahout/cf/taste/impl/model/MemoryIDMigrator.html" title="class in org.apache.mahout.cf.taste.impl.model"><span class="typeNameLink">Prev&nbsp;Class</span></a></li>
<li><a href="../../../../../../../org/apache/mahout/cf/taste/impl/model/PlusAnonymousConcurrentUserDataModel.html" title="class in org.apache.mahout.cf.taste.impl.model"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../../../../../index.html?org/apache/mahout/cf/taste/impl/model/MySQLJDBCIDMigrator.html" target="_top">Frames</a></li>
<li><a href="MySQLJDBCIDMigrator.html" target="_top">No&nbsp;Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../../../../../allclasses-noframe.html">All&nbsp;Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<div>
<ul class="subNavList">
<li>Summary:&nbsp;</li>
<li>Nested&nbsp;|&nbsp;</li>
<li><a href="#fields.inherited.from.class.org.apache.mahout.cf.taste.impl.model.AbstractJDBCIDMigrator">Field</a>&nbsp;|&nbsp;</li>
<li><a href="#constructor.summary">Constr</a>&nbsp;|&nbsp;</li>
<li><a href="#methods.inherited.from.class.org.apache.mahout.cf.taste.impl.model.AbstractJDBCIDMigrator">Method</a></li>
</ul>
<ul class="subNavList">
<li>Detail:&nbsp;</li>
<li>Field&nbsp;|&nbsp;</li>
<li><a href="#constructor.detail">Constr</a>&nbsp;|&nbsp;</li>
<li>Method</li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2008&#x2013;2017 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>