Examples of abort()


Examples of org.apache.hive.hcatalog.data.transfer.HCatWriter.abort()

    WriteEntity entity = builder.withTable("mytbl").build();
    HCatWriter writer = DataTransferFactory.getHCatWriter(entity, config);
    if (status) {
      writer.commit(context);
    } else {
      writer.abort(context);
    }
  }

  private static HCatRecord getRecord(int i) {
    List<Object> list = new ArrayList<Object>(2);
View Full Code Here

Examples of org.apache.http.client.methods.AbortableHttpRequest.abort()

      } catch (Exception e) {
        //abort request, according to best practice with HttpClient
        if (proxyRequest instanceof AbortableHttpRequest) {
          AbortableHttpRequest abortableHttpRequest = (AbortableHttpRequest) proxyRequest;
          abortableHttpRequest.abort();
        }
        if (e instanceof RuntimeException)
          throw (RuntimeException)e;
        if (e instanceof ServletException)
          throw (ServletException)e;
View Full Code Here

Examples of org.apache.http.client.methods.HttpDelete.abort()

      // We presume that the data is utf-8, since that's what the API uses throughout.
      return responseString;
    }
    finally
    {
      method.abort();
    }
  }

  /** Perform an json API PUT operation.
  *@param apiURL is the operation.
View Full Code Here

Examples of org.apache.http.client.methods.HttpEntityEnclosingRequestBase.abort()

            responseCode = response.getStatusLine().getStatusCode();
            if (responseCode != 307) {
                throw new IOException(String.format("Error returned from server. Status: %s - %s", responseCode, status.getReasonPhrase()));
            }
        } catch (IOException e) {
            method.abort();
            throw e;
        } finally {
            method.releaseConnection();
        }
View Full Code Here

Examples of org.apache.http.client.methods.HttpGet.abort()

          return PageFetchStatus.OK;
        } else {
          return PageFetchStatus.PageLoadError;
        }
      } else {
        get.abort();
      }
    } catch (IOException e) {
      logger.error("Fatal transport error: " + e.getMessage() + " while fetching " + toFetchURL
          + " (link found in doc #" + page.getWebURL().getParentDocid() + ")");
      return PageFetchStatus.FatalTransportError;
View Full Code Here

Examples of org.apache.http.client.methods.HttpHead.abort()

                        "Failed to transfer file: " + url + ". Return code is: " + statusCode + reasonPhrase );
            }
        }
        finally
        {
            headMethod.abort();
        }
    }

    protected HttpResponse execute( HttpUriRequest httpMethod )
        throws HttpException, IOException
View Full Code Here

Examples of org.apache.http.client.methods.HttpPost.abort()

      // We presume that the data is utf-8, since that's what the API uses throughout.
      return responseString;
    }
    finally
    {
      method.abort();
    }
  }

  /** Perform a json GET API operation, using Configuration structures to represent the json.  This is for testing convenience,
  * mostly.
 
View Full Code Here

Examples of org.apache.http.client.methods.HttpPut.abort()

      // We presume that the data is utf-8, since that's what the API uses throughout.
      return responseString;
    }
    finally
    {
      method.abort();
    }
  }

  /** Perform an json API POST operation.
  *@param apiURL is the operation.
View Full Code Here

Examples of org.apache.http.client.methods.HttpRequestBase.abort()

      if (resultCode != 200)
        throw new IOException("Unexpected result code "+resultCode+": "+convertToString(httpResponse));
      Object jo = convertToJSON(httpResponse);
      response.acceptJSONObject(jo);
    } finally {
      method.abort();
    }
  }

  /**
   * Obtain repository information.
View Full Code Here

Examples of org.apache.http.client.methods.HttpUriRequest.abort()

    public boolean interrupt() {
        HttpUriRequest request = currentRequest;
        if (request != null) {
            currentRequest = null; // don't try twice
            try {
                request.abort();
            } catch (UnsupportedOperationException e) {
                log.warn("Could not abort pending request", e);
            }
        }
        return request != null;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.