hive-protolib/src/main/java/com/streamsets/pipeline/stage/lib/hive/HiveMetastoreUtil.java
@SuppressWarnings("unchecked")
  public static <T extends HMSCacheSupport.HMSCacheInfo> T getCacheInfo(
      HMSCache hmsCache,
      HMSCacheType cacheType,
      String qualifiedName,
      HiveQueryExecutor queryExecutor
  ) throws StageException {
    HMSCacheSupport.HMSCacheInfo cacheInfo = hmsCache.getIfPresent(cacheType, qualifiedName);
    if (cacheType != HMSCacheType.AVRO_SCHEMA_INFO && cacheInfo == null) {
      // Try loading by executing HMS query
      cacheInfo = hmsCache.getOrLoad(cacheType, qualifiedName, queryExecutor);
    }
    return (T)cacheInfo;
  }
@SuppressWarnings("unchecked")
  public static <T extends HMSCacheSupport.HMSCacheInfo> T getCacheInfo(
      HMSCache hmsCache,
      HMSCacheType cacheType,
      String qualifiedName,
      HiveQueryExecutor queryExecutor
  ) throws StageException {
    HMSCacheSupport.HMSCacheInfo cacheInfo = hmsCache.getIfPresent(cacheType, qualifiedName);
    if (cacheType != HMSCacheType.AVRO_SCHEMA_INFO && cacheInfo == null) {
      // Try loading by executing HMS query
      cacheInfo = hmsCache.getOrLoad(cacheType, qualifiedName, queryExecutor);
    }
    return (T)cacheInfo;
  }
@ SuppressWarnings ( "unchecked" ) public static < T extends HMSCacheSupport . HMSCacheInfo > T getCacheInfo ( HMSCache hmsCache , HMSCacheType cacheType , String qualifiedName , HiveQueryExecutor queryExecutor ) throws StageException { HMSCacheSupport . HMSCacheInfo cacheInfo = hmsCache . getIfPresent ( cacheType , qualifiedName ) ; if ( cacheType != HMSCacheType . AVRO_SCHEMA_INFO && cacheInfo == null ) { // Try loading by executing HMS query cacheInfo = hmsCache . getOrLoad ( cacheType , qualifiedName , queryExecutor ) ; } return ( T ) cacheInfo ; }
Gets cached {@link com.streamsets.pipeline.stage.lib.hive.cache.HMSCacheSupport.HMSCacheInfo}
from cache.<br>
First call getIfPresent to obtain data from local cache.If not exists, load from HMS

@param <T> {@link HMSCacheSupport.HMSCacheInfo}
@param hmsCache {@link HMSCache}
@param cacheType Type of cache to load.
@param qualifiedName qualified table name.
@return Cache object if successfully loaded. Null if no data is found in cache.
@throws StageException
Gets cached { @link com . streamsets . pipeline . stage . lib . hive . cache . HMSCacheSupport . HMSCacheInfo } from cache . <br > First call getIfPresent to obtain data from local cache . If not exists load from HMS