Hi

I am using ignite compute task to retrieve data from BigQuery. Here is the
configuration on both thick client and server sides:

<property name="peerClassLoadingEnabled" value="true"/>
<property name="deploymentMode" value="CONTINUOUS"/>

The compute task can be described as follows:

public class BigQueryStorageReadTask implements
IgniteClosure<LoadingRequest, Long> {
  @IgniteInstanceResource
  private Ignite ignite;

  @Override
  public Long apply(LoadingRequest query) {
    return loadToCache(query);
  }

  private void readFromBigQuery(LoadingRequest query) {

    try (BigQueryReadClient client = BigQueryReadClient.create()) {
      // Read data from BigQuery using storage read api
      .....
    } catch (IOException e) {
      throw new RuntimeException(e);
    }
  }
}

The dependency issue occurs when I read data from BigQuery using storage
read api, which needs the dependency

implementation platform('com.google.cloud:libraries-bom:26.22.0')
implementation 'com.google.cloud:google-cloud-bigquery:2.23.2'

If I use simple SQL api to read data from BigQuery, which only needs
'com.google.cloud:google-cloud-bigquery:2.23.2', then there's no issue and
compute task works fine, but with the bom dependency

com.google.cloud:libraries-bom

The remote compute task will give various errors due to lack of
dependencies. Since my ignite server nodes start with xml script instead of
a spring application, I tried to add library jars manually into user_libs,
but still lack some low-level dependencies.

I wonder if there's any way to solve this dependency management for remote
compute task? I think it's the peerClassLoading that does not work properly.

Regards,
Bill

Reply via email to