Table API / SQL UIDs not the only one

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Table API / SQL UIDs not the only one

WeiWen Fan
This post was updated on .
a job  have two sql
source is kafka
sink is redis  or other sink

Asql

select
  reqIp as factorContenta,
  count(*) as eCount,
  60 * 60 as expire
from
  kafka_source
where
  uri is not null
group by
  hop(
    rowtime,
    interval '2' second,
    interval '60' minute
  ),
  reqIp


Bsql

select
        uid as factorContentb,
  count(*) as eCount,
  60 * 60 as expire
from
  kafka_source
where
  uri is not null
group by
  hop(
    rowtime,
    interval '2' second,
    interval '60' minute
  ),
  uid


now only start Asql  stop Bsql    sink  have key   656.19.173.34

then stop Asql and savepoint hdfs   now  del key 656.19.173.34( if sink is
kafka Don't delete)

start Bsql  from savepoint
you will find sink have key   656.19.173.34 and 6630519 all exist

Bsql fetch Asql savepoint result

i think sql uids not the only one

Who can help me see this problem?

my test data is

{
   "reqIp" : "656.19.173.34",
   "rowtime" : 1537950912546,
   "uid" : 6630519,
   "uri" : "/web"
}



--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/
Reply | Threaded
Open this post in threaded view
|

Re: Table API / SQL UIDs not the only one

Dawid Wysakowicz-2
Hi,

Could you rephrase your question? I think some parts of the question are
missing. It would be also easier to help you if you could state the
final problem a bit more clearly.

Best,

Dawid

On 23/10/2018 04:06, WeiWen Fan wrote:

> a job  have two sql
> source is kafka
> sink is redis  or other sink
>
> Asql
>
>
> Bsql
>
>
> now only start Asql  stop Bsql    sink  have key   656.19.173.34
>
> then stop Asql and savepoint hdfs   now  del key 656.19.173.34( if sink is
> kafka Don't delete)
>
> start Bsql  from savepoint
> you will find sink have key   656.19.173.34 and 6630519 all exist
>
> Bsql fetch Asql savepoint result
>
> i think sql uids not the only one
>
> Who can help me see this problem?
>
>
>
>
> --
> Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/


signature.asc (849 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Table API / SQL UIDs not the only one

WeiWen Fan
In reply to this post by WeiWen Fan
i delete  ‘row‘   flag
 it seems good looking
--------------------------------------
a job  have two sql
source is kafka
sink is redis  or other sink

Asql

select
  reqIp as factorContenta,
  count(*) as eCount,
  60 * 60 as expire
from
  kafka_source
where
  uri is not null
group by
  hop(
    rowtime,
    interval '2' second,
    interval '60' minute
  ),
  reqIp


Bsql

select
        uid as factorContentb,
  count(*) as eCount,
  60 * 60 as expire
from
  kafka_source
where
  uri is not null
group by
  hop(
    rowtime,
    interval '2' second,
    interval '60' minute
  ),
  uid


now only start Asql  stop Bsql    sink  have key   656.19.173.34

then stop Asql and savepoint hdfs   now  del key 656.19.173.34( if sink is
kafka Don't delete)

start Bsql  from savepoint
you will find sink have key   656.19.173.34 and 6630519 all exist

Bsql fetch Asql savepoint result

i think sql uids not the only one

Who can help me see this problem?

my test data is

{
   "reqIp" : "656.19.173.34",
   "rowtime" : 1537950912546,
   "uid" : 6630519,
   "uri" : "/web"
}



--
Sent from: http://apache-flink-user-mailing-list-archive.2336050.n4.nabble.com/