hbase-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Sean Busbey <bus...@cloudera.com>
Subject Re: Removal of deprecated features
Date Mon, 06 Apr 2015 15:20:49 GMT
On Mon, Apr 6, 2015 at 6:54 AM, Lars Francke <lars.francke@gmail.com> wrote:

> Thanks Lars. Any other opinions, any more input?
>
> If not I hope to have some time this week to work on these points:
>
> * In the master branch (which will be released as 2.0.0 if I'm not
> mistaken) remove (or undeprecate if it turns out the functionality is
> actually still needed) all functionality that was marked deprecated prior
> to 1.0.0
> * Clarify that all deprecations that were added in 1.x will be removed in
> 3.0.0 (using JavaDoc and in the book)
> * Clarify that all deprecations that were added in 2.x will be removed in
> 4.0.0 (using JavaDoc and in the book)
> * Clarify the SemVer documentation with a different example
>
> I'd rather not do unnecessary or unwanted work :)
>
>

FWIW, this works for me. The lack of complaints leads me to believe it
works for other PMCs. ;)

Please make sure these removals have good release notes. Folks who know
what their API usage looks like should have a heads up prior to
recompiling. (I'm happy to help iterate on release notes once you get to
that point.)


> Any (git) hints on how to figure out for which tag something was first
> marked deprecated are welcome too...
>
>
You should be able to get an approximation using git blame and git tag
--contains.

eg:

$> git checkout 1.0.0
$>  git blame -s
hbase-client/src/main/java//org/apache/hadoop/hbase/client/Put.java | grep
-i -A 2 "@deprecated"
c4d58162 hbase-client/src/main/java/org/apache/hadoop/hbase/client/Put.java
140)    * @deprecated Since 1.0.0. Use {@link #addColumn(byte[], byte[],
byte[])}
6af42926 src/java/org/apache/hadoop/hbase/client/Put.java
141)    */
c4d58162 hbase-client/src/main/java/org/apache/hadoop/hbase/client/Put.java
142)   @Deprecated
1115f46d src/java/org/apache/hadoop/hbase/client/Put.java
143)   public Put add(byte [] family, byte [] qualifier, byte [] value) {
c4d58162 hbase-client/src/main/java/org/apache/hadoop/hbase/client/Put.java
144)     return addColumn(family, qualifier, value);
--
c4d58162 hbase-client/src/main/java/org/apache/hadoop/hbase/client/Put.java
183)    * @deprecated Since 1.0.0. Use {@link #addColumn(byte[], byte[],
long, byte[])}
6af42926 src/java/org/apache/hadoop/hbase/client/Put.java
184)    */
c4d58162 hbase-client/src/main/java/org/apache/hadoop/hbase/client/Put.java
185)   @Deprecated
1115f46d src/java/org/apache/hadoop/hbase/client/Put.java
186)   public Put add(byte [] family, byte [] qualifier, long ts, byte []
value) {
c4d58162 hbase-client/src/main/java/org/apache/hadoop/hbase/client/Put.java
187)     return addColumn(family, qualifier, ts, value);
--
c4d58162 hbase-client/src/main/java/org/apache/hadoop/hbase/client/Put.java
263)    * @deprecated Since 1.0.0. Use {@link Put#addColumn(byte[],
ByteBuffer, long, ByteBuffer)}
dc8ecd9a hbase-client/src/main/java/org/apache/hadoop/hbase/client/Put.java
264)    */
c4d58162 hbase-client/src/main/java/org/apache/hadoop/hbase/client/Put.java
265)   @Deprecated
dc8ecd9a hbase-client/src/main/java/org/apache/hadoop/hbase/client/Put.java
266)   public Put add(byte[] family, ByteBuffer qualifier, long ts,
ByteBuffer value) {
c4d58162 hbase-client/src/main/java/org/apache/hadoop/hbase/client/Put.java
267)     return addColumn(family, qualifier, ts, value);
--
73731d92 hbase-client/src/main/java/org/apache/hadoop/hbase/client/Put.java
477)   @Deprecated
73731d92 hbase-client/src/main/java/org/apache/hadoop/hbase/client/Put.java
478)   public Put setWriteToWAL(boolean write) {
73731d92 hbase-client/src/main/java/org/apache/hadoop/hbase/client/Put.java
479)     return (Put) super.setWriteToWAL(write);
--
73731d92 hbase-client/src/main/java/org/apache/hadoop/hbase/client/Put.java
493)   @Deprecated
73731d92 hbase-client/src/main/java/org/apache/hadoop/hbase/client/Put.java
494)   public Put setFamilyMap(NavigableMap<byte[], List<KeyValue>> map) {
73731d92 hbase-client/src/main/java/org/apache/hadoop/hbase/client/Put.java
495)     return (Put) super.setFamilyMap(map);
$>  git tag --contains c4d58162
1.0.0
1.0.0RC5

So it looks like the three listed versions of add were present as of 1.0.0,
so we can remove them in 2.0.0.

The one exception to this is if the deprecation doc was altered after it
was added, for example to add a proper message. To check for that case
case, you need to look at the version prior to the one above to confirm.
(rev^ means "the version before rev")

$> git blame -s c4d58162^
hbase-client/src/main/java//org/apache/hadoop/hbase/client/Put.java | grep
-i -A 2 "@deprecated"
73731d92 hbase-client/src/main/java/org/apache/hadoop/hbase/client/Put.java
435)   @Deprecated
73731d92 hbase-client/src/main/java/org/apache/hadoop/hbase/client/Put.java
436)   public Put setWriteToWAL(boolean write) {
73731d92 hbase-client/src/main/java/org/apache/hadoop/hbase/client/Put.java
437)     return (Put) super.setWriteToWAL(write);
--
73731d92 hbase-client/src/main/java/org/apache/hadoop/hbase/client/Put.java
451)   @Deprecated
73731d92 hbase-client/src/main/java/org/apache/hadoop/hbase/client/Put.java
452)   public Put setFamilyMap(NavigableMap<byte[], List<KeyValue>> map) {
73731d92 hbase-client/src/main/java/org/apache/hadoop/hbase/client/Put.java
453)     return (Put) super.setFamilyMap(map);


A limitation of this approach in combination with our branching model is
that it'll only find when the change happened within one major development
line. For example, if you do the above in the master branch you won't find
the @deprecated in a release because it was added after we added branch-1.

-- 
Sean

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message