Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add remote cluster client #29495

Merged
merged 8 commits into from Apr 13, 2018

Conversation

@s1monw
Copy link
Contributor

commented Apr 12, 2018

This change adds a client that is connected to a remote cluster.
This allows plugins and internal structures to invoke actions on
remote clusters just like a if it's a local cluster. The remote
cluster must be configured via the cross cluster search infrastructure.

Add remote cluster client
This change adds a client that is connected to a remote cluster.
This allows plugins and internal structures to invoke actions on
remote clusters just like a if it's a local cluster. The remote
cluster must be configured via the cross cluster search infrastructure.
@elasticmachine

This comment has been minimized.

Copy link
Collaborator

commented Apr 12, 2018

s1monw added some commits Apr 12, 2018

@martijnvg
Copy link
Member

left a comment

LGTM - I really like how the Client interface is reused here.

s1monw added some commits Apr 12, 2018

@jasontedor
Copy link
Member

left a comment

LGTM. Nicely done.

@javanna
Copy link
Member

left a comment

LGTM thanks @s1monw


/**
* Returns a client to a remote cluster with the given cluster alias.
* This method is optinoal and might throw {@link UnsupportedOperationException}

This comment has been minimized.

Copy link
@javanna

javanna Apr 13, 2018

Member

oh one thing s/optinoal/optional :P

@@ -398,4 +400,16 @@ public void onFailure(Exception e) {
});
}
}

/**
* Returns a client to the remote cluster if the given cluster alias exists.

This comment has been minimized.

Copy link
@javanna

javanna Apr 13, 2018

Member

while at it, shall we mention that it throws if cluster alias is not found (rather than for instance returning null)

s1monw added some commits Apr 13, 2018

@s1monw s1monw merged commit 694e2a9 into elastic:master Apr 13, 2018

1 of 3 checks passed

elasticsearch-ci Build started sha1 is merged.
Details
elasticsearch-ci/packaging-sample Build started sha1 is merged.
Details
CLA Commit author is a member of Elasticsearch
Details

s1monw added a commit that referenced this pull request Apr 13, 2018

Add remote cluster client (#29495)
This change adds a client that is connected to a remote cluster.
This allows plugins and internal structures to invoke actions on
remote clusters just like a if it's a local cluster. The remote
cluster must be configured via the cross cluster search infrastructure.

jasontedor added a commit to jasontedor/elasticsearch that referenced this pull request Apr 13, 2018

Merge branch 'master' into java-home-sweet-java-home
* master:
  Enable skipping fetching latest for BWC builds (elastic#29497)
  Add remote cluster client (elastic#29495)
  Ensure flush happens on shard idle
  Adds SpanGapQueryBuilder in the query DSL (elastic#28636)
  Control max size and count of warning headers (elastic#28427)
  Make index APIs work without types. (elastic#29479)
  Deprecate filtering on `_type`. (elastic#29468)
  Fix auto-generated ID example format (elastic#29461)
  Fix typo in max number of threads check docs (elastic#29469)
  Add primary term to translog header (elastic#29227)
  Add a helper method to get a random java.util.TimeZone (elastic#29487)
  Move TimeValue into elasticsearch-core project (elastic#29486)

martijnvg added a commit that referenced this pull request Apr 13, 2018

Merge remote-tracking branch 'es/master' into ccr
* es/master:
  Add remote cluster client (#29495)
  Ensure flush happens on shard idle
  Adds SpanGapQueryBuilder in the query DSL (#28636)
  Control max size and count of warning headers (#28427)
  Make index APIs work without types. (#29479)
  Deprecate filtering on `_type`. (#29468)
  Fix auto-generated ID example format (#29461)
  Fix typo in max number of threads check docs (#29469)
  Add primary term to translog header (#29227)
  Add a helper method to get a random java.util.TimeZone (#29487)
  Move TimeValue into elasticsearch-core project (#29486)
  Fix NPE in InternalGeoCentroidTests#testReduceRandom (#29481)
  Build: introduce keystoreFile for cluster config (#29491)
  test: Index more docs, so that it is less likely the search request does not time out.

martijnvg added a commit that referenced this pull request Apr 13, 2018

Merge remote-tracking branch 'es/6.x' into ccr-6.x
* es/6.x:
  Enable skipping fetching latest for BWC builds (#29497)
  Add remote cluster client (#29495)
  Ensure flush happens on shard idle
  Adds SpanGapQueryBuilder in the query DSL (#28636)
  Fix auto-generated ID example format (#29461)
  Fix typo in max number of threads check docs (#29469)
  Add primary term to translog header (#29227)
  Add a helper method to get a random java.util.TimeZone (#29487)
  Move TimeValue into elasticsearch-core project (#29486)
  Fix NPE in InternalGeoCentroidTests#testReduceRandom (#29481)
  Build: introduce keystoreFile for cluster config (#29491)
  test: Index more docs, so that it is less likely the search request does not time out.

martijnvg added a commit that referenced this pull request Apr 25, 2018

Add the ability to the follow index to follow an index in a remote cl…
…uster.

The follow index api completely reuses CCS infrastructure that was exposed via:
#29495

This means that the leader index parameter support the same ccs index
to indicate that an index resides in a different cluster.

I also added a qa module that smoke tests the cross cluster nature of ccr.
The idea is that this test just verifies that ccr can read data from a
remote leader index and that is it, no crazy randomization or indirectly
testing other features.

@colings86 colings86 removed the v7.0.0 label Feb 7, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.