Class MetaStoreConst

java.lang.Object
org.pentaho.di.metastore.MetaStoreConst

public class MetaStoreConst extends Object
  • Field Details

  • Constructor Details

    • MetaStoreConst

      public MetaStoreConst()
  • Method Details

    • getDefaultPentahoMetaStoreLocation

      public static final String getDefaultPentahoMetaStoreLocation()
    • openLocalPentahoMetaStore

      public static org.pentaho.metastore.api.IMetaStore openLocalPentahoMetaStore() throws org.pentaho.metastore.api.exceptions.MetaStoreException
      Throws:
      org.pentaho.metastore.api.exceptions.MetaStoreException
    • openLocalPentahoMetaStore

      public static org.pentaho.metastore.api.IMetaStore openLocalPentahoMetaStore(boolean allowCreate) throws org.pentaho.metastore.api.exceptions.MetaStoreException
      Throws:
      org.pentaho.metastore.api.exceptions.MetaStoreException
    • getDefaultMetastoreSupplier

      public static Supplier<org.pentaho.metastore.api.IMetaStore> getDefaultMetastoreSupplier()
    • getDefaultMetastore

      public static org.pentaho.metastore.api.IMetaStore getDefaultMetastore()
    • getMetastoreForDirectorySupplier

      public static Supplier<org.pentaho.metastore.api.IMetaStore> getMetastoreForDirectorySupplier(String rootFolder)
      Returns a metastore implementation at the given path. Different implementations may support different types of paths (e.g. local, vfs) NOTE that this supplier can do some non-trivial work and the result should never change, so the Supplier should only be used for deffered initialization, and the result should generally be held onto.
      Parameters:
      rootFolder - path to the metastore parent directory. The ".metastore" directory will be created under this path.
      Returns:
      IMetaStore a metastore implementation at the given path, or null
    • enableDefaultToLocalXml

      public static void enableDefaultToLocalXml()
      When this is enabled, if the MetastoreLocator returns null, a local xml metastore will be returned. This should only happen when plugins are not loaded, which should only apply in some unit tests. Runtime code should all load the metastore on demand, ideally using the metastoreSupplier above, and should not initialize a metastore at construction time.