Codota Logo
RepositoryFile.toResource
Code IndexAdd Codota to your IDE (free)

How to use
toResource
method
in
org.datacleaner.repository.RepositoryFile

Best Java code snippets using org.datacleaner.repository.RepositoryFile.toResource (Showing top 2 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
BufferedReader b =
  • Codota IconInputStream in;new BufferedReader(new InputStreamReader(in))
  • Codota IconReader in;new BufferedReader(in)
  • Codota IconFile file;new BufferedReader(new FileReader(file))
  • Smart code suggestions by Codota
}
origin: org.eobjects.datacleaner/DataCleaner-monitor-services

public AbstractReferenceDataWizardSession(ReferenceDataWizardContext wizardContext) {
  _wizardContext = wizardContext;
  final Resource resource = getWizardContext().getTenantContext().getConfigurationFile().toResource();
  _writer = new DomConfigurationWriter(resource);
}
origin: org.eobjects.datacleaner/DataCleaner-monitor-services

  private void getResultFileFromCluster(TenantContext tenantContext, ExecutionLogger executionLogger, String hadoopResultFileName, String jobName) {
    HdfsResource resultsResource = null;
    try {
      resultsResource = new HdfsResource(HadoopUtils.getFileSystem().getUri().resolve(hadoopResultFileName)
          .toString());
      if (resultsResource != null && resultsResource.isExists()) {
        final RepositoryFolder repositoryResultFolder = tenantContext.getResultFolder();

        final String fileName = HadoopJobExecutionUtils.getUrlReadyJobName(jobName)
            + FileFilters.ANALYSIS_RESULT_SER.getExtension();
        final Resource resourceFile = repositoryResultFolder.createFile(fileName, null).toResource(); 
        
        logger.info("Writing the result to" + resourceFile.getQualifiedPath());
        FileHelper.copy(resultsResource, resourceFile);
      } else {
        final String message = "An error has occured while running the job. The result was not persisted on Hadoop. Please check Hadoop and/or DataCleaner logs";
        final Exception error = new Exception(message);
        executionLogger.setStatusFailed(null, null, error);
      }
    }
    catch (Exception e) {
      executionLogger.setStatusFailed(null, null, e);
    }
  }
}
org.datacleaner.repositoryRepositoryFiletoResource

Javadoc

Gets a Resource representation of the RepositoryFile.

Popular methods of RepositoryFile

  • writeFile
    Opens up an OutputStream to write to the file.
  • delete
  • getLastModified
  • getName
  • getQualifiedPath
  • getSize
  • readFile
  • getType

Popular in Java

  • Reading from database using SQL prepared statement
  • getContentResolver (Context)
  • startActivity (Activity)
  • runOnUiThread (Activity)
  • PrintStream (java.io)
    A PrintStream adds functionality to another output stream, namely the ability to print representatio
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • IOUtils (org.apache.commons.io)
    General IO stream manipulation utilities. This class provides static utility methods for input/outpu
  • Join (org.hibernate.mapping)
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