I would like to know , how an ECMP and hash mapping are used in load balancing or routing of a tcp packet .Any help with links,examples or papers would be really useful. Sorry for the inconvinience , as I am completely new to this type of scenario. 
Thanks for your time and consideration.
Typical algorithms split the traffic into semi-even groups of N pkts, where N is the number of ECMP links.  So if the pkt sizes differ, or if some "streams" have more pkts than others, the overall traffic rates will not be even.  Some algorithms factor for this.  Breaking up or moving strean is bad (for many reasons).  ECMP can be tiered --at layers1,2,3, and above; or at different physical pts.  Typically, the src & dst ip-addr & protocol/port are used to define each stream.  Sometimes it is configurable.  Publishing the details can create "DoS/"IP"(Intellectual Property) vulnerabilities.  Using the same algorithm at different "tiers" with certain numbers of links at each tier can lead to "polarization" (some links getting no traffic).  To address this, a configurable or random input can be added to the algorithm.  BGP ECMP requires IGP cost to be the same, else routing loops can happen(link/info @ cisco).  Multicast adds more issues(link/info @ cisco).  There are 3 basic types (link/info @ cisco).  This is a deep subject.
Hash Mapping and ECMP