blob: 14f24312dbcf151505205f3e79c28e5b091e4e9c [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="zh">
<head>
<!-- Generated by javadoc (1.8.0_181) on Mon Feb 03 10:59:13 CST 2020 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>LivyClient (Livy 0.7.0-incubating JavaDoc)</title>
<meta name="date" content="2020-02-03">
<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="LivyClient (Livy 0.7.0-incubating JavaDoc)";
}
}
catch(err) {
}
//-->
var methods = {"i0":6,"i1":6,"i2":6,"i3":6,"i4":6,"i5":6,"i6":6};
var tabs = {65535:["t0","所有方法"],2:["t2","实例方法"],4:["t3","抽象方法"]};
var altColor = "altColor";
var rowColor = "rowColor";
var tableTab = "tableTab";
var activeTableTab = "activeTableTab";
</script>
<noscript>
<div>您的浏览器已禁用 JavaScript。</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar.top">
<!-- -->
</a>
<div class="skipNav"><a href="#skip.navbar.top" title="跳过导航链接">跳过导航链接</a></div>
<a name="navbar.top.firstrow">
<!-- -->
</a>
<ul class="navList" title="导航">
<li><a href="../../../org/apache/livy/package-summary.html">程序包</a></li>
<li class="navBarCell1Rev"></li>
<li><a href="class-use/LivyClient.html">使用</a></li>
<li><a href="package-tree.html"></a></li>
<li><a href="../../../deprecated-list.html">已过时</a></li>
<li><a href="../../../index-all.html">索引</a></li>
<li><a href="../../../help-doc.html">帮助</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../org/apache/livy/JobHandle.State.html" title="org.apache.livy中的枚举"><span class="typeNameLink">上一个类</span></a></li>
<li><a href="../../../org/apache/livy/LivyClientBuilder.html" title="org.apache.livy中的类"><span class="typeNameLink">下一个类</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?org/apache/livy/LivyClient.html" target="_top">框架</a></li>
<li><a href="LivyClient.html" target="_top">无框架</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="../../../allclasses-noframe.html">所有类</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>概要:&nbsp;</li>
<li>嵌套&nbsp;|&nbsp;</li>
<li>字段&nbsp;|&nbsp;</li>
<li>构造器&nbsp;|&nbsp;</li>
<li><a href="#method.summary">方法</a></li>
</ul>
<ul class="subNavList">
<li>详细资料:&nbsp;</li>
<li>字段&nbsp;|&nbsp;</li>
<li>构造器&nbsp;|&nbsp;</li>
<li><a href="#method.detail">方法</a></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.livy</div>
<h2 title="接口 LivyClient" class="title">接口 LivyClient</h2>
</div>
<div class="contentContainer">
<div class="description">
<ul class="blockList">
<li class="blockList">
<hr>
<br>
<pre>public interface <span class="typeNameLabel">LivyClient</span></pre>
<div class="block">A client for submitting Spark-based jobs to a Livy backend.</div>
</li>
</ul>
</div>
<div class="summary">
<ul class="blockList">
<li class="blockList">
<!-- ========== METHOD SUMMARY =========== -->
<ul class="blockList">
<li class="blockList"><a name="method.summary">
<!-- -->
</a>
<h3>方法概要</h3>
<table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="方法概要表, 列表方法和解释">
<caption><span id="t0" class="activeTableTab"><span>所有方法</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">实例方法</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">抽象方法</a></span><span class="tabEnd">&nbsp;</span></span></caption>
<tr>
<th class="colFirst" scope="col">限定符和类型</th>
<th class="colLast" scope="col">方法和说明</th>
</tr>
<tr id="i0" class="altColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Future.html?is-external=true" title="java.util.concurrent中的类或接口">Future</a>&lt;?&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/livy/LivyClient.html#addFile-java.net.URI-">addFile</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/net/URI.html?is-external=true" title="java.net中的类或接口">URI</a>&nbsp;uri)</code>
<div class="block">Adds a file to the running remote context.</div>
</td>
</tr>
<tr id="i1" class="rowColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Future.html?is-external=true" title="java.util.concurrent中的类或接口">Future</a>&lt;?&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/livy/LivyClient.html#addJar-java.net.URI-">addJar</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/net/URI.html?is-external=true" title="java.net中的类或接口">URI</a>&nbsp;uri)</code>
<div class="block">Adds a jar file to the running remote context.</div>
</td>
</tr>
<tr id="i2" class="altColor">
<td class="colFirst"><code>&lt;T&gt;&nbsp;<a href="http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Future.html?is-external=true" title="java.util.concurrent中的类或接口">Future</a>&lt;T&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/livy/LivyClient.html#run-org.apache.livy.Job-">run</a></span>(<a href="../../../org/apache/livy/Job.html" title="org.apache.livy中的接口">Job</a>&lt;T&gt;&nbsp;job)</code>
<div class="block">Asks the remote context to run a job immediately.</div>
</td>
</tr>
<tr id="i3" class="rowColor">
<td class="colFirst"><code>void</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/livy/LivyClient.html#stop-boolean-">stop</a></span>(boolean&nbsp;shutdownContext)</code>
<div class="block">Stops the remote context.</div>
</td>
</tr>
<tr id="i4" class="altColor">
<td class="colFirst"><code>&lt;T&gt;&nbsp;<a href="../../../org/apache/livy/JobHandle.html" title="org.apache.livy中的接口">JobHandle</a>&lt;T&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/livy/LivyClient.html#submit-org.apache.livy.Job-">submit</a></span>(<a href="../../../org/apache/livy/Job.html" title="org.apache.livy中的接口">Job</a>&lt;T&gt;&nbsp;job)</code>
<div class="block">Submits a job for asynchronous execution.</div>
</td>
</tr>
<tr id="i5" class="rowColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Future.html?is-external=true" title="java.util.concurrent中的类或接口">Future</a>&lt;?&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/livy/LivyClient.html#uploadFile-java.io.File-">uploadFile</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/io/File.html?is-external=true" title="java.io中的类或接口">File</a>&nbsp;file)</code>
<div class="block">Upload a file to be passed to the Spark application</div>
</td>
</tr>
<tr id="i6" class="altColor">
<td class="colFirst"><code><a href="http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Future.html?is-external=true" title="java.util.concurrent中的类或接口">Future</a>&lt;?&gt;</code></td>
<td class="colLast"><code><span class="memberNameLink"><a href="../../../org/apache/livy/LivyClient.html#uploadJar-java.io.File-">uploadJar</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/io/File.html?is-external=true" title="java.io中的类或接口">File</a>&nbsp;jar)</code>
<div class="block">Upload a jar to be added to the Spark application classpath</div>
</td>
</tr>
</table>
</li>
</ul>
</li>
</ul>
</div>
<div class="details">
<ul class="blockList">
<li class="blockList">
<!-- ============ METHOD DETAIL ========== -->
<ul class="blockList">
<li class="blockList"><a name="method.detail">
<!-- -->
</a>
<h3>方法详细资料</h3>
<a name="submit-org.apache.livy.Job-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>submit</h4>
<pre>&lt;T&gt;&nbsp;<a href="../../../org/apache/livy/JobHandle.html" title="org.apache.livy中的接口">JobHandle</a>&lt;T&gt;&nbsp;submit(<a href="../../../org/apache/livy/Job.html" title="org.apache.livy中的接口">Job</a>&lt;T&gt;&nbsp;job)</pre>
<div class="block">Submits a job for asynchronous execution.</div>
<dl>
<dt><span class="paramLabel">类型参数:</span></dt>
<dd><code>T</code> - The return type of the job</dd>
<dt><span class="paramLabel">参数:</span></dt>
<dd><code>job</code> - The job to execute.</dd>
<dt><span class="returnLabel">返回:</span></dt>
<dd>A handle that be used to monitor the job.</dd>
</dl>
</li>
</ul>
<a name="run-org.apache.livy.Job-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>run</h4>
<pre>&lt;T&gt;&nbsp;<a href="http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Future.html?is-external=true" title="java.util.concurrent中的类或接口">Future</a>&lt;T&gt;&nbsp;run(<a href="../../../org/apache/livy/Job.html" title="org.apache.livy中的接口">Job</a>&lt;T&gt;&nbsp;job)</pre>
<div class="block">Asks the remote context to run a job immediately.
<p>
Normally, the remote context will queue jobs and execute them based on how many worker
threads have been configured. This method will run the submitted job in the same thread
processing the RPC message, so that queueing does not apply.
<p>
It's recommended that this method only be used to run code that finishes quickly. This
avoids interfering with the normal operation of the context.
<p></div>
<dl>
<dt><span class="paramLabel">类型参数:</span></dt>
<dd><code>T</code> - The return type of the job</dd>
<dt><span class="paramLabel">参数:</span></dt>
<dd><code>job</code> - The job to execute.</dd>
<dt><span class="returnLabel">返回:</span></dt>
<dd>A future to monitor the result of the job.</dd>
</dl>
</li>
</ul>
<a name="stop-boolean-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>stop</h4>
<pre>void&nbsp;stop(boolean&nbsp;shutdownContext)</pre>
<div class="block">Stops the remote context.
Any pending jobs will be cancelled, and the remote context will be torn down.</div>
<dl>
<dt><span class="paramLabel">参数:</span></dt>
<dd><code>shutdownContext</code> - Whether to shutdown the underlying Spark context. If false, the
context will keep running and it's still possible to send commands
to it, if the backend being used supports it.</dd>
</dl>
</li>
</ul>
<a name="uploadJar-java.io.File-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>uploadJar</h4>
<pre><a href="http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Future.html?is-external=true" title="java.util.concurrent中的类或接口">Future</a>&lt;?&gt;&nbsp;uploadJar(<a href="http://docs.oracle.com/javase/8/docs/api/java/io/File.html?is-external=true" title="java.io中的类或接口">File</a>&nbsp;jar)</pre>
<div class="block">Upload a jar to be added to the Spark application classpath</div>
<dl>
<dt><span class="paramLabel">参数:</span></dt>
<dd><code>jar</code> - The local file to be uploaded</dd>
<dt><span class="returnLabel">返回:</span></dt>
<dd>A future that can be used to monitor this operation</dd>
</dl>
</li>
</ul>
<a name="addJar-java.net.URI-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>addJar</h4>
<pre><a href="http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Future.html?is-external=true" title="java.util.concurrent中的类或接口">Future</a>&lt;?&gt;&nbsp;addJar(<a href="http://docs.oracle.com/javase/8/docs/api/java/net/URI.html?is-external=true" title="java.net中的类或接口">URI</a>&nbsp;uri)</pre>
<div class="block">Adds a jar file to the running remote context.
<p>
Note that the URL should be reachable by the Spark driver process. If running the driver
in cluster mode, it may reside on a different host, meaning "file:" URLs have to exist
on that node (and not on the client machine).
<p>
If the provided URI has no scheme, it's considered to be relative to the default file system
configured in the Livy server.</div>
<dl>
<dt><span class="paramLabel">参数:</span></dt>
<dd><code>uri</code> - The location of the jar file.</dd>
<dt><span class="returnLabel">返回:</span></dt>
<dd>A future that can be used to monitor the operation.</dd>
</dl>
</li>
</ul>
<a name="uploadFile-java.io.File-">
<!-- -->
</a>
<ul class="blockList">
<li class="blockList">
<h4>uploadFile</h4>
<pre><a href="http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Future.html?is-external=true" title="java.util.concurrent中的类或接口">Future</a>&lt;?&gt;&nbsp;uploadFile(<a href="http://docs.oracle.com/javase/8/docs/api/java/io/File.html?is-external=true" title="java.io中的类或接口">File</a>&nbsp;file)</pre>
<div class="block">Upload a file to be passed to the Spark application</div>
<dl>
<dt><span class="paramLabel">参数:</span></dt>
<dd><code>file</code> - The local file to be uploaded</dd>
<dt><span class="returnLabel">返回:</span></dt>
<dd>A future that can be used to monitor this operation</dd>
</dl>
</li>
</ul>
<a name="addFile-java.net.URI-">
<!-- -->
</a>
<ul class="blockListLast">
<li class="blockList">
<h4>addFile</h4>
<pre><a href="http://docs.oracle.com/javase/8/docs/api/java/util/concurrent/Future.html?is-external=true" title="java.util.concurrent中的类或接口">Future</a>&lt;?&gt;&nbsp;addFile(<a href="http://docs.oracle.com/javase/8/docs/api/java/net/URI.html?is-external=true" title="java.net中的类或接口">URI</a>&nbsp;uri)</pre>
<div class="block">Adds a file to the running remote context.
<p>
Note that the URL should be reachable by the Spark driver process. If running the driver
in cluster mode, it may reside on a different host, meaning "file:" URLs have to exist
on that node (and not on the client machine).
<p>
If the provided URI has no scheme, it's considered to be relative to the default file system
configured in the Livy server.</div>
<dl>
<dt><span class="paramLabel">参数:</span></dt>
<dd><code>uri</code> - The location of the file.</dd>
<dt><span class="returnLabel">返回:</span></dt>
<dd>A future that can be used to monitor the operation.</dd>
</dl>
</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="跳过导航链接">跳过导航链接</a></div>
<a name="navbar.bottom.firstrow">
<!-- -->
</a>
<ul class="navList" title="导航">
<li><a href="../../../org/apache/livy/package-summary.html">程序包</a></li>
<li class="navBarCell1Rev"></li>
<li><a href="class-use/LivyClient.html">使用</a></li>
<li><a href="package-tree.html"></a></li>
<li><a href="../../../deprecated-list.html">已过时</a></li>
<li><a href="../../../index-all.html">索引</a></li>
<li><a href="../../../help-doc.html">帮助</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li><a href="../../../org/apache/livy/JobHandle.State.html" title="org.apache.livy中的枚举"><span class="typeNameLink">上一个类</span></a></li>
<li><a href="../../../org/apache/livy/LivyClientBuilder.html" title="org.apache.livy中的类"><span class="typeNameLink">下一个类</span></a></li>
</ul>
<ul class="navList">
<li><a href="../../../index.html?org/apache/livy/LivyClient.html" target="_top">框架</a></li>
<li><a href="LivyClient.html" target="_top">无框架</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="../../../allclasses-noframe.html">所有类</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>概要:&nbsp;</li>
<li>嵌套&nbsp;|&nbsp;</li>
<li>字段&nbsp;|&nbsp;</li>
<li>构造器&nbsp;|&nbsp;</li>
<li><a href="#method.summary">方法</a></li>
</ul>
<ul class="subNavList">
<li>详细资料:&nbsp;</li>
<li>字段&nbsp;|&nbsp;</li>
<li>构造器&nbsp;|&nbsp;</li>
<li><a href="#method.detail">方法</a></li>
</ul>
</div>
<a name="skip.navbar.bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2020 <a href="https://www.apache.org/">The Apache Software Foundation</a>. All rights reserved.</small></p>
</body>
</html>