Hi Bob,

This not clear for me. Why do a list of columns has bad impact to
performance?
Ignite does not have specific pttern for existing CacheStore implementation
reuse, like everything else you can see from code of CacheJdbcPojoStore[1].

[1]:
https://github.com/apache/ignite/blob/master/modules/core/src/main/java/org/apache/ignite/cache/store/jdbc/CacheJdbcPojoStore.java

On Fri, Oct 21, 2016 at 11:57 AM, 胡永亮/Bob <hu...@neusoft.com> wrote:

> Hi everyone,
>
>     In official document, there are some code about Partition-aware data
> loading.
>
>     private void loadPartition(Connection conn, int part,
> IgniteBiInClosure<Long, Person> clo) {
>
>     try (PreparedStatement st = conn.prepareStatement("select * from PERSONS 
> where partId=?")) {
>       st.setInt(1, part);
>
>       try (ResultSet rs = st.executeQuery()) {
>         while (rs.next()) {
>           *Person person = new Person(rs.getLong(1), rs.getString(2), 
> rs.getString(3));*
>
>           clo.apply(person.getId(), person);
>         }
>       }
>     }
>     catch (SQLException e) {
>       throw new CacheLoaderException("Failed to load values from cache 
> store.", e);
>     }
>   }
>
>     I have a question in real scenario in the previous bold code: My table 
> like Person has 100 columns, so I will list so many colmuns, it is not very 
> efficient.
>
>     But, in the default implemention of cache.loadCache(), there are good 
> code for mapping the DB table to cache object.
>
>     Can I reuse these code through some API?
>
>     Thanks your reply.
>
>
> ------------------------------
> Bob
>
> ------------------------------------------------------------
> ---------------------------------------
> Confidentiality Notice: The information contained in this e-mail and any
> accompanying attachment(s)
> is intended only for the use of the intended recipient and may be
> confidential and/or privileged of
> Neusoft Corporation, its subsidiaries and/or its affiliates. If any reader
> of this communication is
> not the intended recipient, unauthorized use, forwarding, printing,
> storing, disclosure or copying
> is strictly prohibited, and may be unlawful.If you have received this
> communication in error,please
> immediately notify the sender by return e-mail, and delete the original
> message and all copies from
> your system. Thank you.
> ------------------------------------------------------------
> ---------------------------------------
>



-- 
Vladislav Pyatkov

Reply via email to