Re: lucene-solr:master: SOLR-9614: fixing TestSolrCloudWithKerberosAlt

2016-10-18 Thread Mikhail Khludnev
Ok. Got it.

On Tue, Oct 18, 2016 at 10:24 AM, Alan Woodward  wrote:

> Good idea, Hoss.  Mikhail, we can use the @SuppressForbidden annotation on
> that method to allow it in this one case.
>
> Alan Woodward
> www.flax.co.uk
>
>
> On 18 Oct 2016, at 05:16, Mikhail Khludnev  wrote:
>
> If we do that, how the following will be possible:
>
> org.apache.solr.client.solrj.impl.SolrHttpClientContextBuilder.
> createContext(Object)
>
>  public HttpClientContext createContext(Object userToken) {
> HttpClientContext context = new HttpClientContext();
>
> On Tue, Oct 18, 2016 at 2:48 AM, Chris Hostetter  > wrote:
>
>>
>> Alan & Mikhail...
>>
>> Should we add HttpClientContext's constructor to forbidden APIs list and
>> force internal code to use the helper APIs to prevent (test) bugs like
>> this in the future?
>>
>>
>>
>> : Date: Mon, 10 Oct 2016 09:22:51 + (UTC)
>> : From: m...@apache.org
>> : Reply-To: dev@lucene.apache.org
>> : To: comm...@lucene.apache.org
>> : Subject: lucene-solr:master: SOLR-9614: fixing
>> TestSolrCloudWithKerberosAlt
>> :
>> : Repository: lucene-solr
>> : Updated Branches:
>> :   refs/heads/master d8bb56d4a -> 9fea5129d
>> :
>> :
>> : SOLR-9614: fixing TestSolrCloudWithKerberosAlt
>> :
>> : Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
>> : Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/9f
>> ea5129
>> : Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/9fea5129
>> : Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/9fea5129
>> :
>> : Branch: refs/heads/master
>> : Commit: 9fea5129d3eaef7cdc8086271677fc807ca1c020
>> : Parents: d8bb56d
>> : Author: Mikhail Khludnev 
>> : Authored: Mon Oct 10 12:18:54 2016 +0300
>> : Committer: Mikhail Khludnev 
>> : Committed: Mon Oct 10 12:20:58 2016 +0300
>> :
>> : --
>> :  .../java/org/apache/solr/client/solrj/impl/HttpClientUtil.java| 3
>> +--
>> :  1 file changed, 1 insertion(+), 2 deletions(-)
>> : --
>> :
>> :
>> : http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/9fea
>> 5129/solr/solrj/src/java/org/apache/solr/client/solrj/impl/
>> HttpClientUtil.java
>> : --
>> : diff --git 
>> a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientUtil.java
>> b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/Http
>> ClientUtil.java
>> : index ed285d1..d4dea17 100644
>> : --- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/Http
>> ClientUtil.java
>> : +++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/Http
>> ClientUtil.java
>> : @@ -406,9 +406,8 @@ public class HttpClientUtil {
>> : * in connection pools if client authentication is enabled.
>> : */
>> :public static HttpClientContext createNewHttpClientRequestContext()
>> {
>> : -HttpClientContext context = new HttpClientContext();
>> : +HttpClientContext context = httpClientRequestContextBuilde
>> r.createContext(HttpSolrClient.cacheKey);
>> :
>> : -context.setUserToken(HttpSolrClient.cacheKey);
>> :  return context;
>> :}
>> :
>> :
>> :
>>
>> -Hoss
>> http://www.lucidworks.com/
>>
>> -
>> To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
>> For additional commands, e-mail: dev-h...@lucene.apache.org
>>
>>
>
>
> --
> Sincerely yours
> Mikhail Khludnev
>
>
>


-- 
Sincerely yours
Mikhail Khludnev


Re: lucene-solr:master: SOLR-9614: fixing TestSolrCloudWithKerberosAlt

2016-10-18 Thread Mikhail Khludnev
Perhaps prohibiting
org.apache.http.client.HttpClient.execute(HttpUriRequest) (w/o context arg)
might give a clue for users.

On Tue, Oct 18, 2016 at 7:16 AM, Mikhail Khludnev  wrote:

> If we do that, how the following will be possible:
>
> org.apache.solr.client.solrj.impl.SolrHttpClientContextBuilder.
> createContext(Object)
>
>  public HttpClientContext createContext(Object userToken) {
> HttpClientContext context = new HttpClientContext();
>
> On Tue, Oct 18, 2016 at 2:48 AM, Chris Hostetter  > wrote:
>
>>
>> Alan & Mikhail...
>>
>> Should we add HttpClientContext's constructor to forbidden APIs list and
>> force internal code to use the helper APIs to prevent (test) bugs like
>> this in the future?
>>
>>
>>
>> : Date: Mon, 10 Oct 2016 09:22:51 + (UTC)
>> : From: m...@apache.org
>> : Reply-To: dev@lucene.apache.org
>> : To: comm...@lucene.apache.org
>> : Subject: lucene-solr:master: SOLR-9614: fixing
>> TestSolrCloudWithKerberosAlt
>> :
>> : Repository: lucene-solr
>> : Updated Branches:
>> :   refs/heads/master d8bb56d4a -> 9fea5129d
>> :
>> :
>> : SOLR-9614: fixing TestSolrCloudWithKerberosAlt
>> :
>> : Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
>> : Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/9f
>> ea5129
>> : Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/9fea5129
>> : Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/9fea5129
>> :
>> : Branch: refs/heads/master
>> : Commit: 9fea5129d3eaef7cdc8086271677fc807ca1c020
>> : Parents: d8bb56d
>> : Author: Mikhail Khludnev 
>> : Authored: Mon Oct 10 12:18:54 2016 +0300
>> : Committer: Mikhail Khludnev 
>> : Committed: Mon Oct 10 12:20:58 2016 +0300
>> :
>> : --
>> :  .../java/org/apache/solr/client/solrj/impl/HttpClientUtil.java| 3
>> +--
>> :  1 file changed, 1 insertion(+), 2 deletions(-)
>> : --
>> :
>> :
>> : http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/9fea
>> 5129/solr/solrj/src/java/org/apache/solr/client/solrj/impl/
>> HttpClientUtil.java
>> : --
>> : diff --git 
>> a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientUtil.java
>> b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/Http
>> ClientUtil.java
>> : index ed285d1..d4dea17 100644
>> : --- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/Http
>> ClientUtil.java
>> : +++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/Http
>> ClientUtil.java
>> : @@ -406,9 +406,8 @@ public class HttpClientUtil {
>> : * in connection pools if client authentication is enabled.
>> : */
>> :public static HttpClientContext createNewHttpClientRequestContext()
>> {
>> : -HttpClientContext context = new HttpClientContext();
>> : +HttpClientContext context = httpClientRequestContextBuilde
>> r.createContext(HttpSolrClient.cacheKey);
>> :
>> : -context.setUserToken(HttpSolrClient.cacheKey);
>> :  return context;
>> :}
>> :
>> :
>> :
>>
>> -Hoss
>> http://www.lucidworks.com/
>>
>> -
>> To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
>> For additional commands, e-mail: dev-h...@lucene.apache.org
>>
>>
>
>
> --
> Sincerely yours
> Mikhail Khludnev
>



-- 
Sincerely yours
Mikhail Khludnev


Re: lucene-solr:master: SOLR-9614: fixing TestSolrCloudWithKerberosAlt

2016-10-18 Thread Alan Woodward
Good idea, Hoss.  Mikhail, we can use the @SuppressForbidden annotation on that 
method to allow it in this one case.

Alan Woodward
www.flax.co.uk


> On 18 Oct 2016, at 05:16, Mikhail Khludnev  wrote:
> 
> If we do that, how the following will be possible:  
> 
> org.apache.solr.client.solrj.impl.SolrHttpClientContextBuilder.createContext(Object)
> 
>  public HttpClientContext createContext(Object userToken) {
> HttpClientContext context = new HttpClientContext();
> 
> On Tue, Oct 18, 2016 at 2:48 AM, Chris Hostetter  > wrote:
> 
> Alan & Mikhail...
> 
> Should we add HttpClientContext's constructor to forbidden APIs list and
> force internal code to use the helper APIs to prevent (test) bugs like
> this in the future?
> 
> 
> 
> : Date: Mon, 10 Oct 2016 09:22:51 + (UTC)
> : From: m...@apache.org 
> : Reply-To: dev@lucene.apache.org 
> : To: comm...@lucene.apache.org 
> : Subject: lucene-solr:master: SOLR-9614: fixing TestSolrCloudWithKerberosAlt
> :
> : Repository: lucene-solr
> : Updated Branches:
> :   refs/heads/master d8bb56d4a -> 9fea5129d
> :
> :
> : SOLR-9614: fixing TestSolrCloudWithKerberosAlt
> :
> : Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo 
> 
> : Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/9fea5129 
> 
> : Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/9fea5129 
> 
> : Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/9fea5129 
> 
> :
> : Branch: refs/heads/master
> : Commit: 9fea5129d3eaef7cdc8086271677fc807ca1c020
> : Parents: d8bb56d
> : Author: Mikhail Khludnev mailto:m...@apache.org>>
> : Authored: Mon Oct 10 12:18:54 2016 +0300
> : Committer: Mikhail Khludnev mailto:m...@apache.org>>
> : Committed: Mon Oct 10 12:20:58 2016 +0300
> :
> : --
> :  .../java/org/apache/solr/client/solrj/impl/HttpClientUtil.java| 3 +--
> :  1 file changed, 1 insertion(+), 2 deletions(-)
> : --
> :
> :
> : 
> http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/9fea5129/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientUtil.java
>  
> 
> : --
> : diff --git 
> a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientUtil.java 
> b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientUtil.java
> : index ed285d1..d4dea17 100644
> : --- 
> a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientUtil.java
> : +++ 
> b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientUtil.java
> : @@ -406,9 +406,8 @@ public class HttpClientUtil {
> : * in connection pools if client authentication is enabled.
> : */
> :public static HttpClientContext createNewHttpClientRequestContext() {
> : -HttpClientContext context = new HttpClientContext();
> : +HttpClientContext context = 
> httpClientRequestContextBuilder.createContext(HttpSolrClient.cacheKey);
> :
> : -context.setUserToken(HttpSolrClient.cacheKey);
> :  return context;
> :}
> :
> :
> :
> 
> -Hoss
> http://www.lucidworks.com/ 
> 
> -
> To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org 
> 
> For additional commands, e-mail: dev-h...@lucene.apache.org 
> 
> 
> 
> 
> 
> -- 
> Sincerely yours
> Mikhail Khludnev



Re: lucene-solr:master: SOLR-9614: fixing TestSolrCloudWithKerberosAlt

2016-10-17 Thread Mikhail Khludnev
If we do that, how the following will be possible:

org.apache.solr.client.solrj.impl.SolrHttpClientContextBuilder.createContext(Object)

 public HttpClientContext createContext(Object userToken) {
HttpClientContext context = new HttpClientContext();

On Tue, Oct 18, 2016 at 2:48 AM, Chris Hostetter 
wrote:

>
> Alan & Mikhail...
>
> Should we add HttpClientContext's constructor to forbidden APIs list and
> force internal code to use the helper APIs to prevent (test) bugs like
> this in the future?
>
>
>
> : Date: Mon, 10 Oct 2016 09:22:51 + (UTC)
> : From: m...@apache.org
> : Reply-To: dev@lucene.apache.org
> : To: comm...@lucene.apache.org
> : Subject: lucene-solr:master: SOLR-9614: fixing
> TestSolrCloudWithKerberosAlt
> :
> : Repository: lucene-solr
> : Updated Branches:
> :   refs/heads/master d8bb56d4a -> 9fea5129d
> :
> :
> : SOLR-9614: fixing TestSolrCloudWithKerberosAlt
> :
> : Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
> : Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/
> 9fea5129
> : Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/9fea5129
> : Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/9fea5129
> :
> : Branch: refs/heads/master
> : Commit: 9fea5129d3eaef7cdc8086271677fc807ca1c020
> : Parents: d8bb56d
> : Author: Mikhail Khludnev 
> : Authored: Mon Oct 10 12:18:54 2016 +0300
> : Committer: Mikhail Khludnev 
> : Committed: Mon Oct 10 12:20:58 2016 +0300
> :
> : --
> :  .../java/org/apache/solr/client/solrj/impl/HttpClientUtil.java| 3
> +--
> :  1 file changed, 1 insertion(+), 2 deletions(-)
> : --
> :
> :
> : http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/
> 9fea5129/solr/solrj/src/java/org/apache/solr/client/solrj/
> impl/HttpClientUtil.java
> : --
> : diff --git 
> a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientUtil.java
> b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/
> HttpClientUtil.java
> : index ed285d1..d4dea17 100644
> : --- a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/
> HttpClientUtil.java
> : +++ b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/
> HttpClientUtil.java
> : @@ -406,9 +406,8 @@ public class HttpClientUtil {
> : * in connection pools if client authentication is enabled.
> : */
> :public static HttpClientContext createNewHttpClientRequestContext() {
> : -HttpClientContext context = new HttpClientContext();
> : +HttpClientContext context = httpClientRequestContextBuilde
> r.createContext(HttpSolrClient.cacheKey);
> :
> : -context.setUserToken(HttpSolrClient.cacheKey);
> :  return context;
> :}
> :
> :
> :
>
> -Hoss
> http://www.lucidworks.com/
>
> -
> To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
> For additional commands, e-mail: dev-h...@lucene.apache.org
>
>


-- 
Sincerely yours
Mikhail Khludnev


Re: lucene-solr:master: SOLR-9614: fixing TestSolrCloudWithKerberosAlt

2016-10-17 Thread Chris Hostetter

Alan & Mikhail...

Should we add HttpClientContext's constructor to forbidden APIs list and 
force internal code to use the helper APIs to prevent (test) bugs like 
this in the future?



: Date: Mon, 10 Oct 2016 09:22:51 + (UTC)
: From: m...@apache.org
: Reply-To: dev@lucene.apache.org
: To: comm...@lucene.apache.org
: Subject: lucene-solr:master: SOLR-9614: fixing TestSolrCloudWithKerberosAlt
: 
: Repository: lucene-solr
: Updated Branches:
:   refs/heads/master d8bb56d4a -> 9fea5129d
: 
: 
: SOLR-9614: fixing TestSolrCloudWithKerberosAlt
: 
: Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
: Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/9fea5129
: Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/9fea5129
: Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/9fea5129
: 
: Branch: refs/heads/master
: Commit: 9fea5129d3eaef7cdc8086271677fc807ca1c020
: Parents: d8bb56d
: Author: Mikhail Khludnev 
: Authored: Mon Oct 10 12:18:54 2016 +0300
: Committer: Mikhail Khludnev 
: Committed: Mon Oct 10 12:20:58 2016 +0300
: 
: --
:  .../java/org/apache/solr/client/solrj/impl/HttpClientUtil.java| 3 +--
:  1 file changed, 1 insertion(+), 2 deletions(-)
: --
: 
: 
: 
http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/9fea5129/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientUtil.java
: --
: diff --git 
a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientUtil.java 
b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientUtil.java
: index ed285d1..d4dea17 100644
: --- 
a/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientUtil.java
: +++ 
b/solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientUtil.java
: @@ -406,9 +406,8 @@ public class HttpClientUtil {
: * in connection pools if client authentication is enabled.
: */
:public static HttpClientContext createNewHttpClientRequestContext() {
: -HttpClientContext context = new HttpClientContext();
: +HttpClientContext context = 
httpClientRequestContextBuilder.createContext(HttpSolrClient.cacheKey);
:  
: -context.setUserToken(HttpSolrClient.cacheKey);
:  return context;
:}
:
: 
: 

-Hoss
http://www.lucidworks.com/

-
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org