Specifically where you live in CA will affect your rights. If there is rent control of any sort in your area it may apply to you regardless of who you paid the rent to. If you paid the rent directly to the landlord, your tenancy may supercede the "master tenant". If you paid it to the tenant then it may or may not, depending on whether the landlord was actually aware (and you can prove he was aware) of your tenancy. It would pay to talk to an attorney.
This link is for landlords, but it pays to know what you're up against. Assuming you don't live in a rent controlled city, all the landlord has to do is serve notice on the master tenant. Since you've sublet for a year and a half, the landlord must give him 60 days. You don't really have any rights in the matter - the master tenant is your landlord, not the property owner. The master tenant can in fact be evicted for having rented to you - and the same 60 days notice is all the both of you get.
A three day notice is usually filed to make the tenant pay rent or quit (leave the premises), or abate a violation of the lease: your being there as a subtenant. You can fight this, but understand you are only buying time. You and the master tenant must file an answer with the court (this is the beginning of the lawsuit to evict you). At that point all eviction activity is stayed, but the court hears evictions quickly so you only have a month or two to leave. And you will leave.
Also you should understand that the interests of the master tenant aren't the same as yours: get your own attorney.