Java Code Examples for org.apache.kylin.common.util.JsonUtil#writeValueAsBytes()
The following examples show how to use
org.apache.kylin.common.util.JsonUtil#writeValueAsBytes() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ZookeeperStreamMetadataStore.java From kylin-on-parquet-v2 with Apache License 2.0 | 5 votes |
@Override public void setCoordinatorNode(Node coordinator) { try { byte[] coordinatorBytes = JsonUtil.writeValueAsBytes(coordinator); client.setData().forPath(coordinatorRoot, coordinatorBytes); writeSuccess.getAndIncrement(); } catch (Exception e) { writeFail.getAndIncrement(); logger.error("Error when set coordinator leader to " + coordinator, e); throw new StoreException(e); } }
Example 2
Source File: Serializer.java From kylin-on-parquet-v2 with Apache License 2.0 | 5 votes |
public byte[] serialize(T obj) throws JsonProcessingException { if (null == obj) { return null; } return JsonUtil.writeValueAsBytes(obj); }
Example 3
Source File: ZookeeperStreamMetadataStore.java From kylin with Apache License 2.0 | 5 votes |
@Override public void setCoordinatorNode(Node coordinator) { try { byte[] coordinatorBytes = JsonUtil.writeValueAsBytes(coordinator); client.setData().forPath(coordinatorRoot, coordinatorBytes); writeSuccess.getAndIncrement(); } catch (Exception e) { writeFail.getAndIncrement(); logger.error("Error when set coordinator leader to " + coordinator, e); throw new StoreException(e); } }
Example 4
Source File: Serializer.java From kylin with Apache License 2.0 | 5 votes |
public byte[] serialize(T obj) throws JsonProcessingException { if (null == obj) { return null; } return JsonUtil.writeValueAsBytes(obj); }
Example 5
Source File: UserService.java From Kylin with Apache License 2.0 | 5 votes |
private byte[] serialize(Collection<? extends GrantedAuthority> auths) throws JsonProcessingException { if (null == auths) { return null; } return JsonUtil.writeValueAsBytes(auths); }
Example 6
Source File: Serializer.java From Kylin with Apache License 2.0 | 5 votes |
public byte[] serialize(T obj) throws JsonProcessingException { if (null == obj) { return null; } return JsonUtil.writeValueAsBytes(obj); }
Example 7
Source File: CubeAssignment.java From kylin-on-parquet-v2 with Apache License 2.0 | 4 votes |
public static byte[] serializeCubeAssignment(CubeAssignment cubeAssignment) throws IOException { return JsonUtil.writeValueAsBytes(cubeAssignment); }
Example 8
Source File: CubeAssignment.java From kylin with Apache License 2.0 | 4 votes |
public static byte[] serializeCubeAssignment(CubeAssignment cubeAssignment) throws IOException { return JsonUtil.writeValueAsBytes(cubeAssignment); }