Okay, that is good feedback. I lean towards un-deprecating as well. Let me
write a draft proposal for some changes so everyone can chime in and
hopefully we'll have a workable target at the end of it.

Thanks, Joris.

On Mon, Dec 2, 2019 at 1:00 PM John Blum <jb...@pivotal.io> wrote:

> My vote would be to UNDEPRECATE the IndexType in Apache Geode.  There are
> several codepaths in SDG that use the IndexType to make certain decisions.
>
> I also think having an Enum is much more flexible than having a method per
> Index type, particularly since you can use Enum values in switch
> statements.  I do like the createXyzIndex methods (e.g. createKeyIndex) for
> common OQL Indexes, however.  I do think the createIndex for
> FUNCTIONAL/RANGE OQL Indexes should be renamed (rather, the old method
> deprecated and a new method introduced, i.e. createRangeIndex or
> createFunctionalIndex).
>
> -j
>
>
> On Mon, Dec 2, 2019 at 9:44 AM Jason Huynh <jhu...@pivotal.io> wrote:
>
> > Hi Joris,
> >
> > Just some guesses and no actual answer from me here:
> >
> > The deprecation of the index type was before HASH indexes were created,
> and
> > my guess was due to the introduction of the "new at the time" query
> service
> > apis (the javadoc:@deprecated As of 6.6.1. Check {@link QueryService}
> for
> > changes.)
> >
> > The internals still use the IndexType as you have pointed out and maybe
> the
> > deprecation was more intended for the end user (since it's not an
> internal
> > type) and perhaps it was intended to have been moved internal at some
> > point?
> >
> > There is some weirdness with the index types and actually having multiple
> > implementations for the Functional type.  Under the covers we create a
> > memory-optimized version based on the indexed expression.
> >
> > Things have changed since deprecation, so maybe it should be
> > un/de-deprecated or an alternative solution can probably be thought up...
> >
> > -Jason
> >
> >
> > On Mon, Dec 2, 2019 at 9:13 AM Joris Melchior <jmelch...@pivotal.io>
> > wrote:
> >
> > > Hi Jason,
> > >
> > > At this point it is not about creating but returning the Region with an
> > > indicator in the management API without using deprecated parts. Under
> the
> > > covers the QueryService java api still uses the IndexType ENUM and had
> > > assumed that an alternative would be provided when something is marked
> as
> > > deprecated.
> > >
> > > I can of course create a new ENUM to return but prefer not to take this
> > > step before ensuring that we don't have something in place already.
> > >
> > > I'm also wondering if the deprecation should have been limited to the
> > HASH
> > > type on the IndexType ENUM instead of deprecating the complete ENUM.
> > >
> > > Thanks, Joris.
> > >
> > > On Mon, Dec 2, 2019 at 12:05 PM Jason Huynh <jhu...@pivotal.io> wrote:
> > >
> > > > Hi Joris,
> > > >
> > > > How are you creating the index?  If using the QueryService java api,
> > > there
> > > > should be createKeyIndex() and createIndex() methods.  These methods
> > > should
> > > > create the primary key index and the functional index.
> > > >
> > > > I am not sure if there is an alternative in gfsh... it might still be
> > > using
> > > > the IndexType enum or something similar.
> > > >
> > > >
> > > >
> > > >
> > > > On Fri, Nov 29, 2019 at 12:18 PM Joris Melchior <
> jmelch...@pivotal.io>
> > > > wrote:
> > > >
> > > > > Thanks John.
> > > > >
> > > > > I'm trying to use it on the server side for the management API so
> > > > > unfortunately the Spring wrapper is not an option. Hopefully
> someone
> > > can
> > > > > provide some insight into the deprecation background once all the
> > > turkey
> > > > > and stuffing has been digested.
> > > > >
> > > > > On Fri, Nov 29, 2019 at 2:16 PM John Blum <jb...@pivotal.io>
> wrote:
> > > > >
> > > > > > FYI... if you are using *Spring Data for Apache Geode* (SDG;
> > > > > > spring-data-geode), then there is an SDG Index enum type
> > > > > > <
> > > > > >
> > > > >
> > > >
> > >
> >
> https://docs.spring.io/spring-data/geode/docs/current/api/org/springframework/data/gemfire/IndexType.html
> > > > > > >
> > > > > > [1]
> > > > > > wrapping the deprecated Apache Geode Index enum type
> > > > > > <
> > > > > >
> > > > >
> > > >
> > >
> >
> https://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/query/IndexType.html
> > > > > > >
> > > > > >  [2].
> > > > > >
> > > > > >
> > > > > >
> > > > > > [1]
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> https://docs.spring.io/spring-data/geode/docs/current/api/org/springframework/data/gemfire/IndexType.html
> > > > > > [2]
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> https://geode.apache.org/releases/latest/javadoc/org/apache/geode/cache/query/IndexType.html
> > > > > >
> > > > > >
> > > > > > On Fri, Nov 29, 2019 at 8:17 AM Joris Melchior <
> > jmelch...@pivotal.io
> > > >
> > > > > > wrote:
> > > > > >
> > > > > > > Hi All,
> > > > > > >
> > > > > > > I notice that the ENUM
> > > > > > >
> > > > > > > org.apache.geode.cache.query.IndexType has been deprecated but
> > > can't
> > > > > > > find what to use instead of this ENUM if I wanted to use a
> > > > > > > non-deprecated alternative.
> > > > > > >
> > > > > > > I understand that HASH indexes are no longer recommended but
> the
> > > > other
> > > > > > > types (PRIMARY_KEY, FUNCTIONAL) are still valid and I believe
> we
> > > > > > > should be able to use them without using deprecated code.
> > > > > > >
> > > > > > > Can anyone tell me how this is accomplished?
> > > > > > >
> > > > > > > Thanks, Joris.
> > > > > > >
> > > > > > >
> > > > > > > --
> > > > > > > *Joris Melchior *
> > > > > > > CF Engineering
> > > > > > > Pivotal Toronto
> > > > > > > 416 877 5427
> > > > > > >
> > > > > > > “Programs must be written for people to read, and only
> > incidentally
> > > > for
> > > > > > > machines to execute.” – *Hal Abelson*
> > > > > > > <https://en.wikipedia.org/wiki/Hal_Abelson>
> > > > > > >
> > > > > >
> > > > > >
> > > > > > --
> > > > > > -John
> > > > > > john.blum10101 (skype)
> > > > > >
> > > > >
> > > > >
> > > > > --
> > > > > *Joris Melchior *
> > > > > CF Engineering
> > > > > Pivotal Toronto
> > > > > 416 877 5427
> > > > >
> > > > > “Programs must be written for people to read, and only incidentally
> > for
> > > > > machines to execute.” – *Hal Abelson*
> > > > > <https://en.wikipedia.org/wiki/Hal_Abelson>
> > > > >
> > > >
> > >
> > >
> > > --
> > > *Joris Melchior *
> > > CF Engineering
> > > Pivotal Toronto
> > > 416 877 5427
> > >
> > > “Programs must be written for people to read, and only incidentally for
> > > machines to execute.” – *Hal Abelson*
> > > <https://en.wikipedia.org/wiki/Hal_Abelson>
> > >
> >
>
>
> --
> -John
> john.blum10101 (skype)
>


-- 
*Joris Melchior *
CF Engineering
Pivotal Toronto
416 877 5427

“Programs must be written for people to read, and only incidentally for
machines to execute.” – *Hal Abelson*
<https://en.wikipedia.org/wiki/Hal_Abelson>

Reply via email to