You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by tillrohrmann <gi...@git.apache.org> on 2015/06/10 09:41:27 UTC

[GitHub] flink pull request: [FLINK-2194] [type extractor] Treats Writable ...

GitHub user tillrohrmann opened a pull request:

    https://github.com/apache/flink/pull/814

    [FLINK-2194] [type extractor] Treats Writable type as generic type (interface)

    Adds check so that the `Writable` type is treated as a generic type.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/tillrohrmann/flink alexeyMahoutDSL

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/814.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #814
    
----
commit 63e8af405d8bdd68d2b95edee35a630ecffc01b9
Author: Till Rohrmann <tr...@apache.org>
Date:   2015-06-09T14:11:05Z

    [FLINK-2194] [type extractor] Excludes Writable type from WritableTypeInformation to be treated as an interface

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-2194] [type extractor] Treats Writable ...

Posted by tillrohrmann <gi...@git.apache.org>.
Github user tillrohrmann commented on the pull request:

    https://github.com/apache/flink/pull/814#issuecomment-110664983
  
    Travis gives green light. Will merge since it's a trivial fix.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-2194] [type extractor] Treats Writable ...

Posted by tillrohrmann <gi...@git.apache.org>.
Github user tillrohrmann commented on the pull request:

    https://github.com/apache/flink/pull/814#issuecomment-114232368
  
    The subtypes of `Writable` are still serialized using the special `Writable` serializer. However, there are situations where you only have a `Writable` type, e.g. for the Mahout DSL or if you have `DataSet` of `LongWritable` and `TextWritable`.. Why should we not allow to use the interface type then?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-2194] [type extractor] Treats Writable ...

Posted by StephanEwen <gi...@git.apache.org>.
Github user StephanEwen commented on the pull request:

    https://github.com/apache/flink/pull/814#issuecomment-114080543
  
    I am unsure of where this leads us. The purpose of `Writable` is to make sure that we can use the Writable's custom serialization. If the type `Writable` itself is now treated as a generic type, it is serialized with Kryo and that voids the assumption that it uses its own serialization code.
    
    What is the reason for doing it this way? Throwing an error that "raw" Writables are not supported would help them understand the issues easier...


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-2194] [type extractor] Treats Writable ...

Posted by rmetzger <gi...@git.apache.org>.
Github user rmetzger commented on the pull request:

    https://github.com/apache/flink/pull/814#issuecomment-114501534
  
    I don't think Kryo is handling classes implementing `Writable` in a special way.
    It should be trivial to add a special Kryo serializer for it (see also https://github.com/twitter/chill/issues/191)


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-2194] [type extractor] Treats Writable ...

Posted by tillrohrmann <gi...@git.apache.org>.
Github user tillrohrmann commented on the pull request:

    https://github.com/apache/flink/pull/814#issuecomment-114236910
  
    Moreover, it would be inconsistent IMO with the rest of the typing system. Sometimes interfaces are supported and sometimes not. For the user, this might be confusing since it's nowhere documented, as far as I know.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-2194] [type extractor] Treats Writable ...

Posted by tillrohrmann <gi...@git.apache.org>.
Github user tillrohrmann commented on the pull request:

    https://github.com/apache/flink/pull/814#issuecomment-114863239
  
    @rmetzger suggested to add a specialized Kryo serializer for the `Writable` interface. That way we could directly call the write method of `Writable` types which might be faster than Kryo's default serializer.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-2194] [type extractor] Treats Writable ...

Posted by StephanEwen <gi...@git.apache.org>.
Github user StephanEwen commented on the pull request:

    https://github.com/apache/flink/pull/814#issuecomment-114424839
  
    Ah, okay. I was not aware that they are handled by a special writable serializer (that is subclass aware) and that still uses the writable logic. Is it s special kryo serializer that delegates to the writable logic?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-2194] [type extractor] Treats Writable ...

Posted by tillrohrmann <gi...@git.apache.org>.
Github user tillrohrmann commented on the pull request:

    https://github.com/apache/flink/pull/814#issuecomment-114860764
  
    I did not mean a special Kryo serializer but our very own `WritableSerializer`. With the current implementation `WritableTypeInformation` has precedence over `GenericTypeInfo`. This means that if the `TypeExtractor` sees a `Writable` subtype, then it creates a `WritableTypeInfo`. If the type is the `Writable` interface, then a `GenericTypeInfo` is returned and, thus, Kryo is used.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] flink pull request: [FLINK-2194] [type extractor] Treats Writable ...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/flink/pull/814


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---