Codota Logo
LineageClient.getLineage
Code IndexAdd Codota to your IDE (free)

How to use
getLineage
method
in
co.cask.cdap.client.LineageClient

Best Java code snippets using co.cask.cdap.client.LineageClient.getLineage (Showing top 7 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
Gson g =
  • Codota Iconnew Gson()
  • Codota IconGsonBuilder gsonBuilder;gsonBuilder.create()
  • Codota Iconnew GsonBuilder().create()
  • Smart code suggestions by Codota
}
origin: caskdata/cdap

/**
 * Retrieves Lineage for a given dataset.
 *
 * @param datasetInstance the dataset for which to retrieve lineage
 * @param startTime start time for the query, in seconds, or in 'now - xs' format
 * @param endTime end time for the query, in seconds, or in 'now - xs' format
 * @param levels number of levels to compute lineage for, or {@code null} to use the LineageHandler's default value
 * @return {@link LineageRecord} for the specified dataset.
 */
public LineageRecord getLineage(DatasetId datasetInstance, String startTime, String endTime,
                @Nullable Integer levels)
 throws IOException, UnauthenticatedException, NotFoundException, BadRequestException, UnauthorizedException {
 return getLineage(datasetInstance, startTime, endTime, Collections.<CollapseType>emptySet(), levels);
}
origin: caskdata/cdap

/**
 * Retrieves Lineage for a given dataset.
 *
 * @param datasetInstance the dataset for which to retrieve lineage
 * @param startTime start time for the query, in seconds
 * @param endTime end time for the query, in seconds
 * @param levels number of levels to compute lineage for, or {@code null} to use the LineageHandler's default value
 * @return {@link LineageRecord} for the specified dataset.
 */
public LineageRecord getLineage(DatasetId datasetInstance, long startTime, long endTime,
                @Nullable Integer levels)
 throws IOException, UnauthenticatedException, NotFoundException, BadRequestException, UnauthorizedException {
 return getLineage(datasetInstance, Long.toString(startTime), Long.toString(endTime), levels);
}
origin: caskdata/cdap

/**
 * Retrieves Lineage for a given dataset.
 *
 * @param datasetInstance the dataset for which to retrieve lineage
 * @param startTime start time for the query, in seconds
 * @param endTime end time for the query, in seconds
 * @param collapseTypes fields on which lineage relations can be collapsed on
 * @param levels number of levels to compute lineage for, or {@code null} to use the LineageHandler's default value
 * @return {@link LineageRecord} for the specified dataset.
 */
public LineageRecord getLineage(DatasetId datasetInstance, long startTime, long endTime,
                Set<CollapseType> collapseTypes, @Nullable Integer levels)
 throws IOException, UnauthenticatedException, NotFoundException, BadRequestException, UnauthorizedException {
 return getLineage(datasetInstance, Long.toString(startTime), Long.toString(endTime), collapseTypes, levels);
}
origin: caskdata/cdap

/**
 * Retrieves Lineage for a given dataset.
 *
 * @param datasetInstance the dataset for which to retrieve lineage
 * @param startTime start time for the query, in seconds, or in 'now - xs' format
 * @param endTime end time for the query, in seconds, or in 'now - xs' format
 * @param collapseTypes fields on which lineage relations can be collapsed on
 * @param levels number of levels to compute lineage for, or {@code null} to use the LineageHandler's default value
 * @return {@link LineageRecord} for the specified dataset.
 */
public LineageRecord getLineage(DatasetId datasetInstance, String startTime, String endTime,
                Set<CollapseType> collapseTypes, @Nullable Integer levels)
 throws IOException, UnauthenticatedException, NotFoundException, BadRequestException, UnauthorizedException {
 String path = String.format("datasets/%s/lineage?start=%s&end=%s", datasetInstance.getDataset(),
               URLEncoder.encode(startTime, "UTF-8"), URLEncoder.encode(endTime, "UTF-8"));
 for (CollapseType collapseType : collapseTypes) {
  path = String.format("%s&collapse=%s", path, collapseType);
 }
 if (levels != null) {
  path = String.format("%s&levels=%d", path, levels);
 }
 return getLineage(datasetInstance, path);
}
origin: caskdata/cdap

@Override
public void perform(Arguments arguments, PrintStream output) throws Exception {
 long currentTime = System.currentTimeMillis();
 DatasetId dataset = cliConfig.getCurrentNamespace().dataset(arguments.get(ArgumentName.DATASET.toString()));
 long start = getTimestamp(arguments.getOptional("start", "min"), currentTime);
 long end = getTimestamp(arguments.getOptional("end", "max"), currentTime);
 Integer levels = arguments.getIntOptional("levels", null);
 LineageRecord lineage = client.getLineage(dataset, start, end, levels);
 Table table = Table.builder()
  .setHeader("start", "end", "relations", "programs", "data")
  .setRows(
   Collections.<List<String>>singletonList(
    Lists.newArrayList(
     Long.toString(lineage.getStart()), Long.toString(lineage.getEnd()), GSON.toJson(lineage.getRelations()),
     GSON.toJson(lineage.getPrograms()), GSON.toJson(lineage.getData()))
   )
  ).build();
 cliConfig.getTableRenderer().render(cliConfig, output, table);
}
origin: co.cask.cdap/cdap-cli

@Override
public void perform(Arguments arguments, PrintStream output) throws Exception {
 long currentTime = System.currentTimeMillis();
 DatasetId dataset = cliConfig.getCurrentNamespace().dataset(arguments.get(ArgumentName.DATASET.toString()));
 long start = getTimestamp(arguments.getOptional("start", "min"), currentTime);
 long end = getTimestamp(arguments.getOptional("end", "max"), currentTime);
 Integer levels = arguments.getIntOptional("levels", null);
 LineageRecord lineage = client.getLineage(dataset, start, end, levels);
 Table table = Table.builder()
  .setHeader("start", "end", "relations", "programs", "data")
  .setRows(
   Collections.<List<String>>singletonList(
    Lists.newArrayList(
     Long.toString(lineage.getStart()), Long.toString(lineage.getEnd()), GSON.toJson(lineage.getRelations()),
     GSON.toJson(lineage.getPrograms()), GSON.toJson(lineage.getData()))
   )
  ).build();
 cliConfig.getTableRenderer().render(cliConfig, output, table);
}
origin: co.cask.cdap/cdap-cli

@Override
public void perform(Arguments arguments, PrintStream output) throws Exception {
 long currentTime = System.currentTimeMillis();
 StreamId stream = cliConfig.getCurrentNamespace().stream(arguments.get(ArgumentName.STREAM.toString()));
 long start = getTimestamp(arguments.getOptional("start", "min"), currentTime);
 long end = getTimestamp(arguments.getOptional("end", "max"), currentTime);
 Integer levels = arguments.getIntOptional("levels", null);
 LineageRecord lineage = client.getLineage(stream, start, end, levels);
 Table table = Table.builder()
  .setHeader("start", "end", "relations", "programs", "data")
  .setRows(
   Collections.<List<String>>singletonList(
    Lists.newArrayList(
     Long.toString(lineage.getStart()), Long.toString(lineage.getEnd()), GSON.toJson(lineage.getRelations()),
     GSON.toJson(lineage.getPrograms()), GSON.toJson(lineage.getData()))
   )
  ).build();
 cliConfig.getTableRenderer().render(cliConfig, output, table);
}
co.cask.cdap.clientLineageClientgetLineage

Javadoc

Retrieves Lineage for a given dataset.

Popular methods of LineageClient

    Popular in Java

    • Updating database using SQL prepared statement
    • getOriginalFilename (MultipartFile)
      Return the original filename in the client's filesystem.This may contain path information depending
    • putExtra (Intent)
    • startActivity (Activity)
    • HttpServer (com.sun.net.httpserver)
      This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
    • Point (java.awt)
      A point representing a location in (x, y) coordinate space, specified in integer precision.
    • RandomAccessFile (java.io)
      Allows reading from and writing to a file in a random-access manner. This is different from the uni-
    • Selector (java.nio.channels)
      A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
    • Timer (java.util)
      A facility for threads to schedule tasks for future execution in a background thread. Tasks may be s
    • XPath (javax.xml.xpath)
      XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
    Codota Logo
    • Products

      Search for Java codeSearch for JavaScript codeEnterprise
    • IDE Plugins

      IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
    • Company

      About UsContact UsCareers
    • Resources

      FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
    Get Codota for your IDE now