Tabnine Logo
XPartition.getLocation
Code IndexAdd Tabnine to your IDE (free)

How to use
getLocation
method
in
org.apache.lens.api.metastore.XPartition

Best Java code snippets using org.apache.lens.api.metastore.XPartition.getLocation (Showing top 17 results out of 315)

origin: apache/lens

private void createFactPartition(String fileName, String fact, String storage) throws JAXBException, IOException {
 XPartition partition = (XPartition) SampleMetastore.readFromXML(fileName);
 String partLocation = partition.getLocation();
 if (!partLocation.startsWith("/")) {
  partition.setLocation("file://" + System.getProperty("lens.home") + "/" + partLocation);
 }
 result = metaClient.addPartitionToFactTable(fact, storage, partition);
 if (result.getStatus().equals(APIResult.Status.FAILED)) {
  System.err.println("Adding partition from:" + fileName + " failed");
  retCode = 1;
 } else {
  System.out.println("Added partition from:" + fileName);
 }
}
origin: apache/lens

private void createDimTablePartition(String fileName, String dimTable, String storage)
 throws JAXBException, IOException {
 XPartition partition = (XPartition) SampleMetastore.readFromXML(fileName);
 String partLocation = partition.getLocation();
 if (!partLocation.startsWith("/")) {
  partition.setLocation("file://" + System.getProperty("lens.home") + "/" + partLocation);
 }
 result = metaClient.addPartitionToDimensionTable(dimTable, storage, partition);
 if (result.getStatus().equals(APIResult.Status.FAILED)) {
  System.err.println("Adding partition from:"+ fileName + " failed");
  retCode = 1;
 } else {
  System.out.println("Added partition from:" + fileName);
 }
}
origin: apache/lens

private void createFactPartitions(String fileName, String fact, String storage) throws JAXBException, IOException {
 XPartitionList partitionList = (XPartitionList) SampleMetastore.readFromXML(fileName);
 for (XPartition partition : partitionList.getPartition()) {
  String partLocation = partition.getLocation();
  if (!partLocation.startsWith("/")) {
   partition.setLocation("file://" + System.getProperty("lens.home") + "/" + partLocation);
  }
 }
 result = metaClient.addPartitionsToFactTable(fact, storage, partitionList);
 if (result.getStatus().equals(APIResult.Status.FAILED)) {
  System.err.println("Adding partitions from:" + fileName + " failed");
  retCode = 1;
 } else {
  System.out.println("Added partitions from:" + fileName);
 }
}
origin: apache/lens

private void createDimTablePartitions(String fileName, String dimTable, String storage)
 throws JAXBException, IOException {
 XPartitionList partitionList = (XPartitionList) SampleMetastore.readFromXML(fileName);
 for (XPartition partition : partitionList.getPartition()) {
  String partLocation = partition.getLocation();
  if (!partLocation.startsWith("/")) {
   partition.setLocation("file://" + System.getProperty("lens.home") + "/" + partLocation);
  }
 }
 result = metaClient.addPartitionsToDimensionTable(dimTable, storage, partitionList);
 if (result.getStatus().equals(APIResult.Status.FAILED)) {
  System.err.println("Adding partitions from:" + fileName + " failed");
  retCode = 1;
 } else {
  System.out.println("Added partitions from:" + fileName);
 }
}
origin: apache/lens

public static void updatePartitionFromXPartition(Partition partition, XPartition xp) throws ClassNotFoundException {
 partition.getParameters().putAll(mapFromXProperties(xp.getPartitionParameters()));
 partition.getTPartition().getSd().getSerdeInfo().setParameters(mapFromXProperties(xp.getSerdeParameters()));
 partition.setLocation(xp.getLocation());
 if (xp.getInputFormat() != null) {
  partition.setInputFormatClass(Class.forName(xp.getInputFormat()).asSubclass(InputFormat.class));
 }
 if (xp.getOutputFormat() != null) {
  Class<? extends HiveOutputFormat> outputFormatClass =
   Class.forName(xp.getOutputFormat()).asSubclass(HiveOutputFormat.class);
  partition.setOutputFormatClass(outputFormatClass);
 }
 partition.getParameters().put(MetastoreConstants.PARTITION_UPDATE_PERIOD, xp.getUpdatePeriod().name());
 partition.getTPartition().getSd().getSerdeInfo().setSerializationLib(xp.getSerdeClassname());
}
origin: org.apache.lens/lens-cube

public static void updatePartitionFromXPartition(Partition partition, XPartition xp) throws ClassNotFoundException {
 partition.getParameters().putAll(mapFromXProperties(xp.getPartitionParameters()));
 partition.getTPartition().getSd().getSerdeInfo().setParameters(mapFromXProperties(xp.getSerdeParameters()));
 partition.setLocation(xp.getLocation());
 if (xp.getInputFormat() != null) {
  partition.setInputFormatClass(Class.forName(xp.getInputFormat()).asSubclass(InputFormat.class));
 }
 if (xp.getOutputFormat() != null) {
  Class<? extends HiveOutputFormat> outputFormatClass =
   Class.forName(xp.getOutputFormat()).asSubclass(HiveOutputFormat.class);
  partition.setOutputFormatClass(outputFormatClass);
 }
 partition.getParameters().put(MetastoreConstants.PARTITION_UPDATE_PERIOD, xp.getUpdatePeriod().name());
 partition.getTPartition().getSd().getSerdeInfo().setSerializationLib(xp.getSerdeClassname());
}
origin: apache/lens

assertEquals(partAddResult.getStatus(), Status.FAILED);
xp.setLocation(xp.getLocation() + "/a/b/c");
APIResult partUpdateResult = target().path("metastore/facts/").path(table).path("storages/S1/partition")
 .queryParam("sessionid", lensSessionId).request(mediaType)
assertEquals(partitions.getPartition().size(), 1);
XPartition readPartition = partitions.getPartition().get(0);
assertEquals(readPartition.getLocation(), xp.getLocation());
assertEquals(readPartition.getTimePartitionSpec(), xp.getTimePartitionSpec());
assertEquals(readPartition.getNonTimePartitionSpec(), xp.getNonTimePartitionSpec());
origin: apache/lens

xp.setLocation(xp.getLocation() + "/a/b/c");
APIResult partUpdateResult = target().path("metastore/dimtables/").path(table).path("storages/test/partition")
 .queryParam("sessionid", lensSessionId).request(mediaType)
assertEquals(partitions.getPartition().size(), 2);
assertEquals(partitions.getPartition().get(0).getLocation(), xp.getLocation());
assertEquals(partitions.getPartition().get(1).getLocation(), xp.getLocation());
origin: apache/lens

assertEquals(partAddResult.getStatus(), Status.FAILED);
xp.setLocation(xp.getLocation() + "/a/b/c");
APIResult partUpdateResult = target().path("metastore/facts/").path(table).path("storages/S2/partition")
 .queryParam("sessionid", lensSessionId)
assertEquals(partitions.getPartition().size(), 1);
XPartition readPartition = partitions.getPartition().get(0);
assertEquals(readPartition.getLocation(), xp.getLocation());
assertEquals(readPartition.getTimePartitionSpec(), xp.getTimePartitionSpec());
assertEquals(readPartition.getNonTimePartitionSpec(), xp.getNonTimePartitionSpec());
origin: org.apache.lens/lens-cube

public static StoragePartitionDesc storagePartSpecFromXPartition(
 XPartition xpart) {
 StoragePartitionDesc partDesc = new StoragePartitionDesc(
  xpart.getFactOrDimensionTableName(),
  timePartSpecfromXTimePartSpec(xpart.getTimePartitionSpec()),
  nonTimePartSpecfromXNonTimePartSpec(xpart.getNonTimePartitionSpec()),
  UpdatePeriod.valueOf(xpart.getUpdatePeriod().name()));
 partDesc.setPartParams(mapFromXProperties(xpart.getPartitionParameters()));
 partDesc.setSerdeParams(mapFromXProperties(xpart.getSerdeParameters()));
 partDesc.setLocation(xpart.getLocation());
 partDesc.setInputFormat(xpart.getInputFormat());
 partDesc.setOutputFormat(xpart.getOutputFormat());
 partDesc.setSerializationLib(xpart.getSerdeClassname());
 return partDesc;
}
origin: apache/lens

public static StoragePartitionDesc storagePartSpecFromXPartition(
 XPartition xpart) {
 StoragePartitionDesc partDesc = new StoragePartitionDesc(
  xpart.getFactOrDimensionTableName(),
  timePartSpecfromXTimePartSpec(xpart.getTimePartitionSpec()),
  nonTimePartSpecfromXNonTimePartSpec(xpart.getNonTimePartitionSpec()),
  UpdatePeriod.valueOf(xpart.getUpdatePeriod().name()));
 partDesc.setPartParams(mapFromXProperties(xpart.getPartitionParameters()));
 partDesc.setSerdeParams(mapFromXProperties(xpart.getSerdeParameters()));
 partDesc.setLocation(xpart.getLocation());
 partDesc.setInputFormat(xpart.getInputFormat());
 partDesc.setOutputFormat(xpart.getOutputFormat());
 partDesc.setSerializationLib(xpart.getSerdeClassname());
 return partDesc;
}
origin: org.apache.lens/lens-api

theLocation = this.getLocation();
strategy.appendField(locator, this, "location", buffer, theLocation);
origin: apache/lens

theLocation = this.getLocation();
strategy.appendField(locator, this, "location", buffer, theLocation);
origin: org.apache.lens/lens-api

lhsLocation = this.getLocation();
String rhsLocation;
rhsLocation = that.getLocation();
if (!strategy.equals(LocatorUtils.property(thisLocator, "location", lhsLocation), LocatorUtils.property(thatLocator, "location", rhsLocation), lhsLocation, rhsLocation)) {
  return false;
origin: apache/lens

lhsLocation = this.getLocation();
String rhsLocation;
rhsLocation = that.getLocation();
if (!strategy.equals(LocatorUtils.property(thisLocator, "location", lhsLocation), LocatorUtils.property(thatLocator, "location", rhsLocation), lhsLocation, rhsLocation)) {
  return false;
origin: apache/lens

theLocation = this.getLocation();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "location", theLocation), currentHashCode, theLocation);
origin: org.apache.lens/lens-api

theLocation = this.getLocation();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "location", theLocation), currentHashCode, theLocation);
org.apache.lens.api.metastoreXPartitiongetLocation

Javadoc

Gets the value of the location property.

Popular methods of XPartition

  • setLocation
    Sets the value of the location property.
  • setFactOrDimensionTableName
    Sets the value of the factOrDimensionTableName property.
  • setTimePartitionSpec
    Sets the value of the timePartitionSpec property.
  • setUpdatePeriod
    Sets the value of the updatePeriod property.
  • <init>
  • getUpdatePeriod
    Gets the value of the updatePeriod property.
  • getFactOrDimensionTableName
    Gets the value of the factOrDimensionTableName property.
  • getFullPartitionSpec
    Gets the value of the fullPartitionSpec property.
  • getNonTimePartitionSpec
    Gets the value of the nonTimePartitionSpec property.
  • getTimePartitionSpec
    Gets the value of the timePartitionSpec property.
  • setNonTimePartitionSpec
    Sets the value of the nonTimePartitionSpec property.
  • setPartitionParameters
    Sets the value of the partitionParameters property.
  • setNonTimePartitionSpec,
  • setPartitionParameters,
  • setSerdeParameters,
  • getInputFormat,
  • getOutputFormat,
  • getPartitionParameters,
  • getSerdeClassname,
  • getSerdeParameters,
  • setFullPartitionSpec

Popular in Java

  • Reading from database using SQL prepared statement
  • requestLocationUpdates (LocationManager)
  • getApplicationContext (Context)
  • setScale (BigDecimal)
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • Servlet (javax.servlet)
    Defines methods that all servlets must implement. A servlet is a small Java program that runs within
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Location (org.springframework.beans.factory.parsing)
    Class that models an arbitrary location in a Resource.Typically used to track the location of proble
  • Top Vim plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now